From 8fd4b096c486f56ad811fb7d696c807db7c78667 Mon Sep 17 00:00:00 2001 From: bigbiff bigbiff Date: Tue, 30 Aug 2016 20:48:53 -0400 Subject: MD5 checking: fix issues introduced with adb backup patchset This patchset will fix issues with creating and checking md5 checksums with single partitions and subpartitions. Change-Id: Iddfaf46412e95635af958094726cf9e3eb5a4cc8 --- partition.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'partition.cpp') diff --git a/partition.cpp b/partition.cpp index 89650db6c..6edc36822 100644 --- a/partition.cpp +++ b/partition.cpp @@ -1612,7 +1612,7 @@ bool TWPartition::Backup(PartitionSettings *part_settings, pid_t *tar_fork_pid) return false; } -bool TWPartition::Check_MD5(string restore_folder) { +bool TWPartition::Check_MD5(PartitionSettings *part_settings) { string Full_Filename, md5file; char split_filename[512]; int index = 0; @@ -1621,7 +1621,7 @@ bool TWPartition::Check_MD5(string restore_folder) { sync(); memset(split_filename, 0, sizeof(split_filename)); - Full_Filename = restore_folder + "/" + Backup_FileName; + Full_Filename = part_settings->Restore_Name + "/" + part_settings->Backup_FileName; if (!TWFunc::Path_Exists(Full_Filename)) { // This is a split archive, we presume sprintf(split_filename, "%s%03i", Full_Filename.c_str(), index); @@ -1647,7 +1647,7 @@ bool TWPartition::Check_MD5(string restore_folder) { // Single file archive md5file = Full_Filename + ".md5"; if (!TWFunc::Path_Exists(md5file)) { - gui_msg(Msg(msg::kError, "no_md5_found=No md5 file found for '{1}'. Please unselect Enable MD5 verification to restore.")(split_filename)); + gui_msg(Msg(msg::kError, "no_md5_found=No md5 file found for '{1}'. Please unselect Enable MD5 verification to restore.")(md5file)); return false; } md5sum.setfn(Full_Filename); -- cgit v1.2.3