commit 5025c1038f81abbc5a1b783690798fc66be33810
Author: Christophe Fergeau <[email protected]>
Date: Sun Jul 17 09:27:14 2011 +0200
fix (again) creation of non-existing Device dirs
Recent iPods (Shuffle, iOS devices, ...) don't have a Device/
subdirectory in their control dir, so we need to create it
ourselves before trying to write a SysInfoExtended file to it.
However, due to a "typo", we were creating
iPod_Control/iTunes/Device/ instead of iPod_Control/Device. This
commit fixes this, even though in the long run we should stop
using the iphone-set-info callout for iOS devices and read the
needed information directly from the device.
tools/generic-callout.c | 10 +++++-----
tools/read-sysinfoextended.c | 10 +++++-----
2 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/tools/generic-callout.c b/tools/generic-callout.c
index dff5fc0..62bd08c 100644
--- a/tools/generic-callout.c
+++ b/tools/generic-callout.c
@@ -626,16 +626,16 @@ static gboolean write_sysinfo_extended (const char
*mountpoint,
/* Make sure the device dir exists (not necessarily true on
* Shuffles */
if (devdirpath == NULL) {
- gchar *itunesdirpath;
+ gchar *controldirpath;
- itunesdirpath = itdb_get_itunes_dir (mountpoint);
- if (itunesdirpath == NULL) {
+ controldirpath = itdb_get_control_dir (mountpoint);
+ if (controldirpath == NULL) {
g_debug("failed to build path for control dir at %s",
mountpoint);
return FALSE;
}
- devdirpath = g_build_filename (itunesdirpath, "Device", NULL);
- g_free (itunesdirpath);
+ devdirpath = g_build_filename (controldirpath, "Device", NULL);
+ g_free (controldirpath);
g_mkdir (devdirpath, 0777);
g_debug("creating %s", devdirpath);
}
diff --git a/tools/read-sysinfoextended.c b/tools/read-sysinfoextended.c
index bf789ce..b3afd2c 100644
--- a/tools/read-sysinfoextended.c
+++ b/tools/read-sysinfoextended.c
@@ -50,14 +50,14 @@ static gboolean write_sysinfo_extended (const char
*mountpoint,
/* Make sure the device dir exists (not necessarily true on
* Shuffles */
if (devdirpath == NULL) {
- gchar *itunesdirpath;
+ gchar *controldirpath;
- itunesdirpath = itdb_get_itunes_dir (mountpoint);
- if (itunesdirpath == NULL) {
+ controldirpath = itdb_get_control_dir (mountpoint);
+ if (controldirpath == NULL) {
return FALSE;
}
- devdirpath = g_build_filename (itunesdirpath, "Device", NULL);
- g_free (itunesdirpath);
+ devdirpath = g_build_filename (controldirpath, "Device", NULL);
+ g_free (controldirpath);
g_mkdir (devdirpath, 0777);
}
filename = g_build_filename (devdirpath, "SysInfoExtended", NULL);
------------------------------------------------------------------------------
Storage Efficiency Calculator
This modeling tool is based on patent-pending intellectual property that
has been used successfully in hundreds of IBM storage optimization engage-
ments, worldwide. Store less, Store more with what you own, Move data to
the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2