diff options
author | bigbiff bigbiff <bigbiff@teamw.in> | 2016-08-09 02:36:10 +0200 |
---|---|---|
committer | bigbiff bigbiff <bigbiff@teamw.in> | 2016-08-09 03:02:39 +0200 |
commit | a481d36402e156f6bad9d58e7deeff64a5c05f72 (patch) | |
tree | bd865b700a9ef7f550c2283153240d58e588a5e8 | |
parent | adbbu: fix include path, now builds again in Omni 4.4 (diff) | |
download | android_bootable_recovery-a481d36402e156f6bad9d58e7deeff64a5c05f72.tar android_bootable_recovery-a481d36402e156f6bad9d58e7deeff64a5c05f72.tar.gz android_bootable_recovery-a481d36402e156f6bad9d58e7deeff64a5c05f72.tar.bz2 android_bootable_recovery-a481d36402e156f6bad9d58e7deeff64a5c05f72.tar.lz android_bootable_recovery-a481d36402e156f6bad9d58e7deeff64a5c05f72.tar.xz android_bootable_recovery-a481d36402e156f6bad9d58e7deeff64a5c05f72.tar.zst android_bootable_recovery-a481d36402e156f6bad9d58e7deeff64a5c05f72.zip |
-rw-r--r-- | partitionmanager.cpp | 16 | ||||
-rw-r--r-- | partitions.hpp | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/partitionmanager.cpp b/partitionmanager.cpp index eabc5d9e2..4ba8053f6 100644 --- a/partitionmanager.cpp +++ b/partitionmanager.cpp @@ -480,14 +480,14 @@ int TWPartitionManager::Check_Backup_Name(bool Display_Error) { return 0; } -bool TWPartitionManager::Make_MD5(bool generate_md5, string Backup_Folder, string Backup_Filename) +bool TWPartitionManager::Make_MD5(PartitionSettings *part_settings) { string command; - string Full_File = Backup_Folder + "/" + Backup_Filename; + string Full_File = part_settings->Full_Backup_Path + part_settings->Backup_FileName; string result; twrpDigest md5sum; - if (!generate_md5) + if (!part_settings->generate_md5) return true; TWFunc::GUI_Operation_Text(TW_GENERATE_MD5_TEXT, gui_parse_text("{@generating_md51}")); @@ -566,7 +566,7 @@ bool TWPartitionManager::Backup_Partition(PartitionSettings *part_settings) { sync(); sync(); if (!part_settings->adbbackup) { - if (!Make_MD5(part_settings->generate_md5, part_settings->Backup_Folder, (*subpart)->Backup_FileName)) { + if (!Make_MD5(part_settings)) { TWFunc::SetPerformanceMode(false); return false; } @@ -584,11 +584,11 @@ bool TWPartitionManager::Backup_Partition(PartitionSettings *part_settings) { } - if (!part_settings->adbbackup) { - md5Success = Make_MD5(part_settings->generate_md5, part_settings->Backup_Folder, part_settings->Part->Backup_FileName); - } - else + if (part_settings->adbbackup) { md5Success = true; + } + else + md5Success = Make_MD5(part_settings); TWFunc::SetPerformanceMode(false); return md5Success; diff --git a/partitions.hpp b/partitions.hpp index 705254612..fc600213c 100644 --- a/partitions.hpp +++ b/partitions.hpp @@ -294,7 +294,7 @@ public: private: void Setup_Settings_Storage_Partition(TWPartition* Part); // Sets up settings storage void Setup_Android_Secure_Location(TWPartition* Part); // Sets up .android_secure if needed - bool Make_MD5(bool generate_md5, string Backup_Folder, string Backup_Filename); // Generates an MD5 after a backup is made + bool Make_MD5(struct PartitionSettings *part_settings); // Generates an MD5 after a backup is made bool Backup_Partition(struct PartitionSettings *part_settings); // Backup the partitions based on type void Output_Partition(TWPartition* Part); // Outputs partition details to the log TWPartition* Find_Partition_By_MTP_Storage_ID(unsigned int Storage_ID); // Returns a pointer to a partition based on MTP Storage ID |