From 9598c07d40861df0a19c218184f851fafe1c91b3 Mon Sep 17 00:00:00 2001 From: Ethan Yonker Date: Fri, 15 Jan 2016 21:54:34 -0600 Subject: Do not require mounting during zip flashing if path exists Change-Id: Ideb4bb39b5e864a43b62e807c38b6395c56a8466 --- gui/action.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gui/action.cpp b/gui/action.cpp index e13d15c68..81c6294e2 100644 --- a/gui/action.cpp +++ b/gui/action.cpp @@ -366,8 +366,15 @@ int GUIAction::flash_zip(std::string filename, int* wipe_cache) return -1; } - if (!PartitionManager.Mount_By_Path(filename, true)) - return -1; + if (!TWFunc::Path_Exists(filename)) { + if (!PartitionManager.Mount_By_Path(filename, true)) { + return -1; + } + if (!TWFunc::Path_Exists(filename)) { + gui_msg(Msg(msg::kError, "unable_to_locate=Unable to locate {1}.")(filename)); + return -1; + } + } if (simulate) { simulate_progress_bar(); -- cgit v1.2.3