summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2016-01-16 04:54:34 +0100
committerDees Troy <dees_troy@teamw.in>2016-01-18 16:16:01 +0100
commit9598c07d40861df0a19c218184f851fafe1c91b3 (patch)
tree647b1bbb6c901964cd9f133b4b82482367121108 /gui
parentImprove flash image handling of mounting (diff)
downloadandroid_bootable_recovery-9598c07d40861df0a19c218184f851fafe1c91b3.tar
android_bootable_recovery-9598c07d40861df0a19c218184f851fafe1c91b3.tar.gz
android_bootable_recovery-9598c07d40861df0a19c218184f851fafe1c91b3.tar.bz2
android_bootable_recovery-9598c07d40861df0a19c218184f851fafe1c91b3.tar.lz
android_bootable_recovery-9598c07d40861df0a19c218184f851fafe1c91b3.tar.xz
android_bootable_recovery-9598c07d40861df0a19c218184f851fafe1c91b3.tar.zst
android_bootable_recovery-9598c07d40861df0a19c218184f851fafe1c91b3.zip
Diffstat (limited to 'gui')
-rw-r--r--gui/action.cpp11
1 files 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();