use incasesensitive checking at included/excluded paths

This commit is contained in:
tibbi 2018-03-22 15:11:22 +01:00
parent 2acc6d01b9
commit be3c8a7b89

View File

@ -255,7 +255,7 @@ class MediaFetcher(val context: Context) {
} }
private fun isThisOrParentExcluded(path: String, excludedPaths: MutableSet<String>, includedPaths: MutableSet<String>) = private fun isThisOrParentExcluded(path: String, excludedPaths: MutableSet<String>, includedPaths: MutableSet<String>) =
includedPaths.none { path.startsWith(it) } && excludedPaths.any { path.startsWith(it) } includedPaths.none { path.startsWith(it, true) } && excludedPaths.any { path.startsWith(it, true) }
private fun getMediaInFolder(folder: String, curMedia: ArrayList<Medium>, isPickImage: Boolean, isPickVideo: Boolean, filterMedia: Int, allowRecursion: Boolean) { private fun getMediaInFolder(folder: String, curMedia: ArrayList<Medium>, isPickImage: Boolean, isPickVideo: Boolean, filterMedia: Int, allowRecursion: Boolean) {
val files = File(folder).listFiles() ?: return val files = File(folder).listFiles() ?: return