From c0d40deaae5f1f756ce584ed7bdd346680cdc74c Mon Sep 17 00:00:00 2001 From: Ethan Yonker Date: Tue, 13 Sep 2016 14:41:53 -0500 Subject: Clean up PartitionSettings The PartitionSettings struct contains some data elements that are duplicates of data elements in the TWPartition class that is contained within the PartitionsSettings.Part element. We will eliminate this duplication to help reduce the chances for programming bugs. Specifically, this fixes problems where the current file system does not match the backed up file system. Change-Id: I02f236e72093362050556a2e53a09d1dbb9a269d --- gui/action.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'gui/action.cpp') diff --git a/gui/action.cpp b/gui/action.cpp index 328fc2c52..3fde199d3 100644 --- a/gui/action.cpp +++ b/gui/action.cpp @@ -1739,9 +1739,11 @@ int GUIAction::flashimage(std::string arg __unused) PartitionSettings part_settings; operation_start("Flash Image"); - DataManager::GetValue("tw_zip_location", part_settings.Restore_Name); - DataManager::GetValue("tw_file", part_settings.Backup_FileName); - unsigned long long total_bytes = TWFunc::Get_File_Size(part_settings.Restore_Name + "/" + part_settings.Backup_FileName); + string path, filename; + DataManager::GetValue("tw_zip_location", path); + DataManager::GetValue("tw_file", filename); + part_settings.Backup_Folder = path + "/" + filename; + unsigned long long total_bytes = TWFunc::Get_File_Size(part_settings.Backup_Folder); ProgressTracking progress(total_bytes); part_settings.progress = &progress; part_settings.adbbackup = false; -- cgit v1.2.3