Support encrypted backup files

Also includes features merged from:

Update twrpTar by kokotas

Revised function entryExists().
Added function to get archive's uncompressed size.
Added option to exclude item(s) from the archive.
Revised forks()

http://review.teamw.in/#/c/590/

Change-Id: I01fa2c81643161984eff2625247af75990684bd9
This commit is contained in:
Dees_Troy
2013-05-04 12:39:56 +00:00
committed by Dees_Troy
parent f6b15d1d45
commit 83bd483f3d
46 changed files with 9011 additions and 471 deletions
+6 -1
View File
@@ -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");