From 1fdcdb7c763b1719ed107834b969c44c3efff968 Mon Sep 17 00:00:00 2001 From: Matt Mower Date: Mon, 25 Jan 2016 20:53:47 -0600 Subject: partitions: Avoid duplicate UMS mounts If a device has several LUN but only one storage volume TWRP recognizes (e.g. lun0 for microsd and lun1 for emulated cdrom), then avoid mounting the same partition twice by checking the mount point. Change-Id: Ie23b88acca1818873792e9f65b73b125a15e4a5d --- partitionmanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/partitionmanager.cpp b/partitionmanager.cpp index 71b6557ce..1c59de7f0 100644 --- a/partitionmanager.cpp +++ b/partitionmanager.cpp @@ -1595,7 +1595,7 @@ int TWPartitionManager::usb_storage_enable(void) { } sprintf(lun_file, CUSTOM_LUN_FILE, 1); Mount2 = Find_Next_Storage(Mount1->Mount_Point, true); - if (Mount2) { + if (Mount2 && Mount2->Mount_Point != Mount1->Mount_Point) { Open_Lun_File(Mount2->Mount_Point, lun_file); } } else { -- cgit v1.2.3