diff options
author | Nikias Bassen | 2011-01-05 23:08:49 +0100 |
---|---|---|
committer | Martin Szulecki | 2011-04-11 19:42:19 +0200 |
commit | 06fe3777633b9231879ba8087acf7803e359680f (patch) | |
tree | be5aa8abcb98bd97a8c61bb4a1a582984d17f03a | |
parent | 1129d1deb4b49305fce121a20b0f5983110f4d62 (diff) | |
download | libimobiledevice-06fe3777633b9231879ba8087acf7803e359680f.tar.gz libimobiledevice-06fe3777633b9231879ba8087acf7803e359680f.tar.bz2 |
idevicebackup4: make sure the backup device subdir exists on backup
This is required so that the Info.plist file can be written. Perhaps writing of the Info.plist should be moved to the end later.
-rw-r--r-- | tools/idevicebackup4.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/idevicebackup4.c b/tools/idevicebackup4.c index 1944a7a..c4ee847 100644 --- a/tools/idevicebackup4.c +++ b/tools/idevicebackup4.c @@ -1474,6 +1474,12 @@ checkpoint: switch(cmd) { case CMD_BACKUP: printf("Starting backup...\n"); + + /* make sure backup device sub-directory exists */ + gchar *devbackupdir = g_build_path(G_DIR_SEPARATOR_S, backup_directory, uuid, NULL); + g_mkdir(devbackupdir, 0755); + g_free(devbackupdir); + /* TODO: check domain com.apple.mobile.backup key RequiresEncrypt and WillEncrypt with lockdown */ /* TODO: verify battery on AC enough battery remaining */ |