Revision: 1786
          http://gtkpod.svn.sourceforge.net/gtkpod/?rev=1786&view=rev
Author:   teuf
Date:     2007-11-14 10:23:29 -0800 (Wed, 14 Nov 2007)

Log Message:
-----------
* src/itdb_itunesdb.c: ignore invalid UTF-8 paths which might have
been added to the iPod by the user

Modified Paths:
--------------
    libgpod/trunk/ChangeLog
    libgpod/trunk/src/itdb_itunesdb.c

Modified: libgpod/trunk/ChangeLog
===================================================================
--- libgpod/trunk/ChangeLog     2007-11-14 18:19:21 UTC (rev 1785)
+++ libgpod/trunk/ChangeLog     2007-11-14 18:23:29 UTC (rev 1786)
@@ -1,5 +1,10 @@
 2007-11-14  Christophe <[EMAIL PROTECTED]>
 
+       * src/itdb_itunesdb.c: ignore invalid UTF-8 paths which might have
+       been added to the iPod by the user
+
+2007-11-14  Christophe <[EMAIL PROTECTED]>
+
        * src/itdb_photoalbum.c: use g_list_remove all instead of an
        inefficient combination of g_list_find + g_list_remove
 

Modified: libgpod/trunk/src/itdb_itunesdb.c
===================================================================
--- libgpod/trunk/src/itdb_itunesdb.c   2007-11-14 18:19:21 UTC (rev 1785)
+++ libgpod/trunk/src/itdb_itunesdb.c   2007-11-14 18:23:29 UTC (rev 1786)
@@ -385,10 +385,17 @@
     cur_dir = g_dir_open(good_path,0,NULL);
     if (cur_dir) while ((dir_file = g_dir_read_name(cur_dir)))
     {
-       gchar *file_utf8 = g_filename_to_utf8(dir_file,-1,NULL,NULL,NULL);
-       gchar *file_stdcase = g_utf8_casefold(file_utf8,-1);
-       gboolean found = !g_utf8_collate(file_stdcase,component_stdcase);
+       gchar *file_utf8;
+       gchar *file_stdcase;
+       gboolean found;
        gchar *new_good_path;
+      
+       file_utf8 = g_filename_to_utf8(dir_file,-1,NULL,NULL,NULL);
+       if (file_utf8 == NULL) {
+           continue;
+       }
+       file_stdcase = g_utf8_casefold(file_utf8,-1);
+       found = !g_utf8_collate(file_stdcase,component_stdcase);
        g_free(file_stdcase);
        if(!found)
        {


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to