Update of /cvsroot/gtkpod/libgpod/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29829/src
Modified Files: itdb_itunesdb.c Log Message: * itdb_itunesdb.c: (itdb_rename_files) also remove "iTunesShuffle" as this file might confuse iPod Shuffles. Index: itdb_itunesdb.c =================================================================== RCS file: /cvsroot/gtkpod/libgpod/src/itdb_itunesdb.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- itdb_itunesdb.c 15 Nov 2005 14:41:10 -0000 1.31 +++ itdb_itunesdb.c 19 Nov 2005 08:07:12 -0000 1.32 @@ -1,4 +1,4 @@ -/* Time-stamp: <2005-11-13 14:58:17 jcs> +/* Time-stamp: <2005-11-19 17:05:44 jcs> | | Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net> | Part of the gtkpod project. @@ -3997,10 +3997,12 @@ const gchar *db_itd[] = {"iPod_Control", "iTunes", NULL}; const gchar *db_plc_o[] = {"Play Counts", NULL}; const gchar *db_otg[] = {"OTGPlaylistInfo", NULL}; + const gchar *db_shu[] = {"iTunesShuffle", NULL}; gchar *itunesdir; gchar *plcname_o; gchar *plcname_n; gchar *otgname; + gchar *shuname; gboolean result = TRUE; itunesdir = itdb_resolve_path (mp, db_itd); @@ -4022,6 +4024,7 @@ plcname_n = g_build_filename (itunesdir, "Play Counts.bak", NULL); otgname = itdb_resolve_path (itunesdir, db_otg); + shuname = itdb_resolve_path (itunesdir, db_shu); /* rename "Play Counts" to "Play Counts.bak" */ if (plcname_o) @@ -4055,9 +4058,27 @@ } } + /* remove some Shuffle files */ + if (shuname) + { + if (unlink (shuname) == -1) + { + if (error && !*error) + { /* don't overwrite previous error */ + g_set_error (error, + G_FILE_ERROR, + g_file_error_from_errno (errno), + _("Error removing '%s' (%s)."), + shuname, g_strerror (errno)); + } + result = FALSE; + } + } + g_free (plcname_o); g_free (plcname_n); g_free (otgname); + g_free (shuname); g_free (itunesdir); return result; ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click _______________________________________________ gtkpod-cvs2 mailing list gtkpod-cvs2@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2