diff --git a/gui/action.cpp b/gui/action.cpp index 96f62095..95343990 100644 --- a/gui/action.cpp +++ b/gui/action.cpp @@ -325,7 +325,7 @@ void GUIAction::simulate_progress_bar(void) } } -int GUIAction::flash_zip(std::string filename, std::string pageName, int* wipe_cache) +int GUIAction::flash_zip(std::string filename, int* wipe_cache) { int ret_val = 0; @@ -337,15 +337,9 @@ int GUIAction::flash_zip(std::string filename, std::string pageName, int* wipe_c return -1; } - // We're going to jump to this page first, like a loading page - gui_changePage(pageName); - if (!PartitionManager.Mount_By_Path(filename, true)) return -1; - // TODO: why again? - gui_changePage(pageName); - if (simulate) { simulate_progress_bar(); } else { @@ -944,29 +938,33 @@ void GUIAction::reinject_after_flash() int GUIAction::flash(std::string arg) { int i, ret_val = 0, wipe_cache = 0; + // We're going to jump to this page first, like a loading page + gui_changePage(arg); for (i=0; i