From 06fe3777633b9231879ba8087acf7803e359680f Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Wed, 5 Jan 2011 23:08:49 +0100 Subject: 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. --- tools/idevicebackup4.c | 6 ++++++ 1 file changed, 6 insertions(+) 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 */ -- cgit v1.1-32-gdbae