summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2016-01-15 23:46:35 +0100
committerDees Troy <dees_troy@teamw.in>2016-01-18 16:15:26 +0100
commitb78fbdfabc4f5d6e2de0b123f58a61059aa2ad9c (patch)
tree082df6d3a43c9bde1088cd31ffda74eda566d1c5
parentAdd theme version checking (diff)
downloadandroid_bootable_recovery-b78fbdfabc4f5d6e2de0b123f58a61059aa2ad9c.tar
android_bootable_recovery-b78fbdfabc4f5d6e2de0b123f58a61059aa2ad9c.tar.gz
android_bootable_recovery-b78fbdfabc4f5d6e2de0b123f58a61059aa2ad9c.tar.bz2
android_bootable_recovery-b78fbdfabc4f5d6e2de0b123f58a61059aa2ad9c.tar.lz
android_bootable_recovery-b78fbdfabc4f5d6e2de0b123f58a61059aa2ad9c.tar.xz
android_bootable_recovery-b78fbdfabc4f5d6e2de0b123f58a61059aa2ad9c.tar.zst
android_bootable_recovery-b78fbdfabc4f5d6e2de0b123f58a61059aa2ad9c.zip
-rw-r--r--partitionmanager.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index 4cd3e7d59..eeeafb22c 100644
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -2211,8 +2211,15 @@ bool TWPartitionManager::Flash_Image(string Filename) {
gui_msg("image_flash_start=[IMAGE FLASH STARTED]");
gui_msg(Msg("img_to_flash=Image to flash: '{1}'")(Filename));
- if (!Mount_Current_Storage(true))
- return false;
+ if (!TWFunc::Path_Exists(Filename)) {
+ if (!Mount_By_Path(Filename, true)) {
+ return false;
+ }
+ if (!TWFunc::Path_Exists(Filename)) {
+ gui_msg(Msg(msg::kError, "unable_to_locate=Unable to locate {1}.")(Filename));
+ return false;
+ }
+ }
gui_msg("calc_restore=Calculating restore details...");
DataManager::GetValue("tw_flash_partition", Flash_List);