summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--partitionmanager.cpp16
-rw-r--r--partitions.hpp2
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