diff options
author | Dees_Troy <dees_troy@teamw.in> | 2013-02-01 18:00:52 +0100 |
---|---|---|
committer | Gerrit Code Review <gerrit@5.9.244.119> | 2013-02-01 18:00:52 +0100 |
commit | 6c5936700de49017cf1309faec7fe14767cace8b (patch) | |
tree | 48f28bea66288ceca2dcee40de8243d0a30579a5 /partitionmanager.cpp | |
parent | Merge "Disable the forced MD5 check" into twrp2.4 (diff) | |
parent | Fix fail over to vfat from exfat (diff) | |
download | android_bootable_recovery-6c5936700de49017cf1309faec7fe14767cace8b.tar android_bootable_recovery-6c5936700de49017cf1309faec7fe14767cace8b.tar.gz android_bootable_recovery-6c5936700de49017cf1309faec7fe14767cace8b.tar.bz2 android_bootable_recovery-6c5936700de49017cf1309faec7fe14767cace8b.tar.lz android_bootable_recovery-6c5936700de49017cf1309faec7fe14767cace8b.tar.xz android_bootable_recovery-6c5936700de49017cf1309faec7fe14767cace8b.tar.zst android_bootable_recovery-6c5936700de49017cf1309faec7fe14767cace8b.zip |
Diffstat (limited to 'partitionmanager.cpp')
-rw-r--r-- | partitionmanager.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/partitionmanager.cpp b/partitionmanager.cpp index 5230810f1..19efd424a 100644 --- a/partitionmanager.cpp +++ b/partitionmanager.cpp @@ -485,8 +485,7 @@ bool TWPartitionManager::Make_MD5(bool generate_md5, string Backup_Folder, strin ui_print(" * Generating md5...\n"); if (TWFunc::Path_Exists(Full_File)) { - command = "md5sum " + Backup_Filename + " > " + Backup_Filename + ".md5"; - chdir(Backup_Folder.c_str()); + command = "cd '" + Backup_Folder + "' && md5sum '" + Backup_Filename + "' > '" + Backup_Filename + ".md5'"; if (TWFunc::Exec_Cmd(command, result) == 0) { ui_print(" * MD5 Created.\n"); return true; @@ -503,8 +502,7 @@ bool TWPartitionManager::Make_MD5(bool generate_md5, string Backup_Folder, strin intToStr << index; ostringstream fn; fn << setw(3) << setfill('0') << intToStr.str(); - command = "md5sum " + Backup_Filename + fn.str() + " >" + Backup_Filename + fn.str() + ".md5"; - chdir(Backup_Folder.c_str()); + command = "cd '" + Backup_Folder + "' && md5sum '" + Backup_Filename + fn.str() + "' > '" + Backup_Filename + fn.str() + ".md5'"; if (TWFunc::Exec_Cmd(command, result) != 0) { ui_print(" * MD5 Error.\n"); return false; @@ -887,7 +885,9 @@ int TWPartitionManager::Run_Backup(void) { Update_System_Details(); UnMount_Main_Partitions(); ui_print("[BACKUP COMPLETED IN %d SECONDS]\n\n", total_time); // the end - return true; + string backup_log = Full_Backup_Path + "recovery.log"; + TWFunc::copy_file("/tmp/recovery.log", backup_log, 0644); + return true; } bool TWPartitionManager::Restore_Partition(TWPartition* Part, string Restore_Name, int partition_count) { |