From 4b546b6d52215ccc35d58a7c5a2f40f32e66c1ad Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 20 Feb 2019 16:56:16 +0100 Subject: [PATCH] add OTG path to the included paths initially --- .../simplemobiletools/gallery/pro/activities/MainActivity.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt index b814ed2b0..0f0618f94 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt @@ -375,7 +375,9 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { if (!config.wasOTGHandled && hasPermission(PERMISSION_WRITE_STORAGE) && hasOTGConnected() && config.OTGPath.isEmpty()) { config.wasOTGHandled = true getStorageDirectories().firstOrNull { it.trimEnd('/') != internalStoragePath && it.trimEnd('/') != sdCardPath }?.apply { - config.OTGPath = trimEnd('/') + val otgPath = trimEnd('/') + config.OTGPath = otgPath + config.addIncludedFolder(otgPath) } } }.start()