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
This commit is contained in:
Ethan Yonker
2016-09-13 14:53:37 -05:00
parent ea2fcf0179
commit dcf2b674c4
5 changed files with 49 additions and 56 deletions
+5 -3
View File
@@ -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;