aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcaozhiyuan <cao.zhiyuan@zte.com.cn>2015-06-10 16:46:38 +0800
committerSteve Kondik <steve@cyngn.com>2015-11-07 19:02:26 -0800
commit6e8d63857eba5f3d7ef2661e674a258f9d1934f2 (patch)
tree543bbfe56430c8082479d499a91a3768fb84ee60
parent0997ce973c09513e79a5b3e597cddf4e0ad77b62 (diff)
downloadbootable_recovery-6e8d63857eba5f3d7ef2661e674a258f9d1934f2.zip
bootable_recovery-6e8d63857eba5f3d7ef2661e674a258f9d1934f2.tar.gz
bootable_recovery-6e8d63857eba5f3d7ef2661e674a258f9d1934f2.tar.bz2
Unmount sdcard if no package file is selected.
Change-Id: I12b4f880802135a98dbc11a19e74172a3a5ef921
-rw-r--r--recovery.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/recovery.cpp b/recovery.cpp
index 24533be..d5b0157 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -767,6 +767,7 @@ static int apply_from_sdcard(Device* device, bool* wipe_cache) {
char* path = browse_directory(SDCARD_ROOT, device);
if (path == NULL) {
ui->Print("\n-- No package file selected.\n");
+ ensure_path_unmounted(SDCARD_ROOT);
return INSTALL_ERROR;
}