fix some glitches with incasesensitive paths at directories

This commit is contained in:
tibbi 2017-09-25 22:55:22 +02:00
parent 417c1169f8
commit c242f74f9b

View file

@ -34,9 +34,11 @@ class GetDirectoriesAsynctask(val context: Context, val isPickVideo: Boolean, va
val directories = groupDirectories(media) val directories = groupDirectories(media)
val removePaths = ArrayList<String>() val removePaths = ArrayList<String>()
directories.keys.forEach { for ((path, curMedia) in directories) {
if (!File(it).exists() || !shouldFolderBeVisible(it, excludedPaths, includedPaths)) { // make sure the path has uppercase letters wherever appropriate
removePaths.add(it) val groupPath = File(curMedia.first().path).parent
if (!File(groupPath).exists() || !shouldFolderBeVisible(groupPath, excludedPaths, includedPaths)) {
removePaths.add(groupPath)
} }
} }
@ -66,7 +68,7 @@ class GetDirectoriesAsynctask(val context: Context, val isPickVideo: Boolean, va
else -> parentDir.getFilenameFromPath() else -> parentDir.getFilenameFromPath()
} }
if (File(path).containsNoMedia()) { if (File(parentDir).containsNoMedia()) {
dirName += " $hidden" dirName += " $hidden"
} }