From 32b6a87440e0c8012f744e6f93f750a6eac3f233 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 11 Aug 2017 13:39:35 +0200 Subject: [PATCH] show included folders content only when appropriate --- .../kotlin/com/simplemobiletools/gallery/extensions/context.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/context.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/context.kt index 1f57f026c..2fd607c32 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/context.kt @@ -150,7 +150,7 @@ private fun parseCursor(context: Context, cur: Cursor, isPickImage: Boolean, isP } } - config.includedFolders.filter { it.isNotEmpty() || it == curPath }.mapNotNull { File(it).listFiles() }.forEach { + config.includedFolders.filter { it.isNotEmpty() && (curPath.isEmpty() || it == curPath) }.mapNotNull { File(it).listFiles() }.forEach { for (file in it) { val size = file.length() if (size <= 0L) {