summaryrefslogtreecommitdiffstats
path: root/openrecoveryscript.cpp
diff options
context:
space:
mode:
authorDees_Troy <dees_troy@teamw.in>2013-05-04 14:39:56 +0200
committerDees_Troy <dees_troy@yahoo.com>2013-06-22 23:16:55 +0200
commit83bd483f3db1df4b69c1612030e1a1be05b303ad (patch)
treed5c7b468b831244bfcd90aadda98b9d359d0d280 /openrecoveryscript.cpp
parentFix building of updater binary (diff)
downloadandroid_bootable_recovery-83bd483f3db1df4b69c1612030e1a1be05b303ad.tar
android_bootable_recovery-83bd483f3db1df4b69c1612030e1a1be05b303ad.tar.gz
android_bootable_recovery-83bd483f3db1df4b69c1612030e1a1be05b303ad.tar.bz2
android_bootable_recovery-83bd483f3db1df4b69c1612030e1a1be05b303ad.tar.lz
android_bootable_recovery-83bd483f3db1df4b69c1612030e1a1be05b303ad.tar.xz
android_bootable_recovery-83bd483f3db1df4b69c1612030e1a1be05b303ad.tar.zst
android_bootable_recovery-83bd483f3db1df4b69c1612030e1a1be05b303ad.zip
Diffstat (limited to 'openrecoveryscript.cpp')
-rw-r--r--openrecoveryscript.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/openrecoveryscript.cpp b/openrecoveryscript.cpp
index a842d3370..f6f63dc0e 100644
--- a/openrecoveryscript.cpp
+++ b/openrecoveryscript.cpp
@@ -215,6 +215,8 @@ int OpenRecoveryScript::run_script_file(void) {
PartitionManager.Set_Restore_Files(folder_path);
string Partition_List;
+ int is_encrypted = 0;
+ DataManager::GetValue("tw_restore_encrypted", is_encrypted);
DataManager::GetValue("tw_restore_list", Partition_List);
if (strlen(partitions) != 0) {
string Restore_List;
@@ -260,7 +262,10 @@ int OpenRecoveryScript::run_script_file(void) {
} else {
DataManager::SetValue("tw_restore_selected", Partition_List);
}
- if (!PartitionManager.Run_Restore(folder_path))
+ if (is_encrypted) {
+ LOGERR("Unable to use OpenRecoveryScript to restore an encrypted backup.\n");
+ ret_val = 1;
+ } else if (!PartitionManager.Run_Restore(folder_path))
ret_val = 1;
else
gui_print("Restore complete!\n");