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
This commit is contained in:
Matt Mower
2016-01-25 20:53:47 -06:00
committed by Dees Troy
parent 209c963575
commit 1fdcdb7c76
+1 -1
View File
@@ -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 {