fix a glitch at including/excluding folders

This commit is contained in:
tibbi 2020-03-07 23:21:22 +01:00
parent 8dfba43ef0
commit c25ce6eafe

View file

@ -7,9 +7,9 @@ import com.simplemobiletools.commons.helpers.NOMEDIA
import java.io.File
import java.io.IOException
fun String.isThisOrParentIncluded(includedPaths: MutableSet<String>) = includedPaths.any { startsWith(it, true) }
fun String.isThisOrParentIncluded(includedPaths: MutableSet<String>) = includedPaths.any { equals(it, true) } || includedPaths.any { "$this/".startsWith("$it/", true) }
fun String.isThisOrParentExcluded(excludedPaths: MutableSet<String>) = excludedPaths.any { startsWith(it, true) }
fun String.isThisOrParentExcluded(excludedPaths: MutableSet<String>) = excludedPaths.any { equals(it, true) } || excludedPaths.any { "$this/".startsWith("$it/", true) }
fun String.shouldFolderBeVisible(excludedPaths: MutableSet<String>, includedPaths: MutableSet<String>, showHidden: Boolean): Boolean {
if (isEmpty()) {