From e33206b0849f56cad2ebe57275f91d74aa2d16c1 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 28 Aug 2017 20:56:02 +0200 Subject: [PATCH] make sure we always show manually included folders, even if somehow hidden --- .../gallery/asynctasks/GetDirectoriesAsynctask.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetDirectoriesAsynctask.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetDirectoriesAsynctask.kt index ebc8182f0..e903ad565 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetDirectoriesAsynctask.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetDirectoriesAsynctask.kt @@ -82,7 +82,9 @@ class GetDirectoriesAsynctask(val context: Context, val isPickVideo: Boolean, va private fun shouldFolderBeVisible(path: String, excludedPaths: MutableSet, includedPaths: MutableSet): Boolean { val file = File(path) - return if (isThisOrParentExcluded(path, excludedPaths, includedPaths)) { + return if (includedPaths.contains(path)) { + true + } else if (isThisOrParentExcluded(path, excludedPaths, includedPaths)) { false } else if (!config.shouldShowHidden && file.isDirectory && file.canonicalFile == file.absoluteFile) { var containsNoMediaOrDot = file.containsNoMedia() || path.contains("/.")