From e080c1f8fbb4e4d7d5d6a911f804be13344fda26 Mon Sep 17 00:00:00 2001 From: Ethan Yonker Date: Mon, 19 Sep 2016 13:50:25 -0500 Subject: Fix image flashing PS2: full_filename is not a dir PS3: use a consistent format of always assuming directory is missing the trailing / + fix whitespace alignment Change-Id: Ib963473ae10571b3d069b326d024ca04c7224dda (cherry picked from commit fa4ff144374474c541351d153549ad11d4396614) --- gui/action.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'gui') diff --git a/gui/action.cpp b/gui/action.cpp index a917d2be3..a96e15ac9 100644 --- a/gui/action.cpp +++ b/gui/action.cpp @@ -1737,18 +1737,11 @@ int GUIAction::flashimage(std::string arg __unused) { int op_status = 0; - PartitionSettings part_settings; operation_start("Flash Image"); 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; - part_settings.PM_Method = PM_RESTORE; - if (PartitionManager.Flash_Image(&part_settings)) + if (PartitionManager.Flash_Image(path, filename)) op_status = 0; // success else op_status = 1; // fail -- cgit v1.2.3