From b1c1d131d9583a1a24a3619a240bec1bb713ec90 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 4 Sep 2017 21:52:48 +0200 Subject: [PATCH] properly allow excluding or including the root folder --- .../com/simplemobiletools/gallery/extensions/context.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 e9087e1aa..d0d6dcd00 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/context.kt @@ -71,8 +71,8 @@ private fun parseCursor(context: Context, cur: Cursor, isPickImage: Boolean, isP val config = context.config val filterMedia = config.filterMedia val showHidden = config.shouldShowHidden - val includedFolders = config.includedFolders.map { "$it/" } - val excludedFolders = config.excludedFolders.map { "$it/" } + val includedFolders = config.includedFolders.map { "${it.trimEnd('/')}/" } + val excludedFolders = config.excludedFolders.map { "${it.trimEnd('/')}/" } val noMediaFolders = context.getNoMediaFolders() val isThirdPartyIntent = config.isThirdPartyIntent