fix backup bug

This commit is contained in:
Koushik K. Dutta 2010-03-08 14:09:35 -08:00
parent 8bbbbd4445
commit 5306db57e5
2 changed files with 6 additions and 5 deletions

View File

@ -25,7 +25,7 @@ LOCAL_MODULE := recovery
LOCAL_FORCE_STATIC_EXECUTABLE := true
RECOVERY_API_VERSION := 1.5.0
RECOVERY_API_VERSION := 1.6.0
LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION)
# This binary is in the recovery ramdisk, which is otherwise a copy of root.

View File

@ -334,9 +334,10 @@ int do_nandroid_backup(char* backup_name)
}
char cmd[PATH_MAX];
if (NULL == backup_name)
backup_name = "";
sprintf(cmd, "/sbin/nandroid-mobile.sh backup /sdcard/clockworkmod/backup/ %s", backup_name);
if (NULL != backup_name)
sprintf(cmd, "/sbin/nandroid-mobile.sh backup /sdcard/clockworkmod/backup/ %s", backup_name);
else
sprintf(cmd, "/sbin/nandroid-mobile.sh backup /sdcard/clockworkmod/backup/");
ui_print("Performing backup...\n");
int ret = system(cmd);
if (ret != 0)
@ -474,4 +475,4 @@ int amend_main(int argc, char** argv)
LOGE("Can't install update commands\n");
}
return run_script(argv[1]);
}
}