commit 8a422be3de6e6ffb56bedacc1257800c5eccef3d Author: Whitney Young <wbyo...@fadingred.com> Date: Thu Sep 16 11:01:22 2010 -0500
Locate the proper control directory when both iPod_Control and iTunes_Control directories exist on a device src/itdb_itunesdb.c | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) --- diff --git a/src/itdb_itunesdb.c b/src/itdb_itunesdb.c index 60bec2e..66e76b1 100644 --- a/src/itdb_itunesdb.c +++ b/src/itdb_itunesdb.c @@ -7579,12 +7579,20 @@ gboolean itdb_cp (const gchar *from_file, const gchar *to_file, */ gchar *itdb_get_control_dir (const gchar *mountpoint) { + gchar *p_iphone[] = {"iTunes_Control", NULL}; gchar *p_ipod[] = {"iPod_Control", NULL}; gchar *p_mobile[] = {"iTunes", "iTunes_Control", NULL}; - gchar *p_iphone[] = {"iTunes_Control", NULL}; /* Use an array with all possibilities, so further extension will - be easy */ - gchar **paths[] = {p_ipod, p_mobile, p_iphone, NULL}; + be easy. It is important that checking for the iTunes_Control + directory be done before the iPod_Control directory because + some devices actually have both directories. The iTunes_Control + directory is correct in these cases. This happens for devices + that Apple shipped with the iPod_Control as the control directory + and later switched to iTunes_Control instead. iTunes appears to + remove files from the old iPod_Control directory but leave the + directory structure intact. Finding this empty directory structure + first will result in a failure to find files. */ + gchar **paths[] = {p_iphone, p_ipod, p_mobile, NULL}; gchar ***ptr; gchar *result = NULL; ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ gtkpod-cvs2 mailing list gtkpod-cvs2@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2