Revision: 1787
http://gtkpod.svn.sourceforge.net/gtkpod/?rev=1787&view=rev
Author: teuf
Date: 2007-11-14 10:24:16 -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/branches/libgpod-0.6/ChangeLog
libgpod/branches/libgpod-0.6/src/itdb_itunesdb.c
Modified: libgpod/branches/libgpod-0.6/ChangeLog
===================================================================
--- libgpod/branches/libgpod-0.6/ChangeLog 2007-11-14 18:23:29 UTC (rev
1786)
+++ libgpod/branches/libgpod-0.6/ChangeLog 2007-11-14 18:24:16 UTC (rev
1787)
@@ -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/branches/libgpod-0.6/src/itdb_itunesdb.c
===================================================================
--- libgpod/branches/libgpod-0.6/src/itdb_itunesdb.c 2007-11-14 18:23:29 UTC
(rev 1786)
+++ libgpod/branches/libgpod-0.6/src/itdb_itunesdb.c 2007-11-14 18:24:16 UTC
(rev 1787)
@@ -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