fix #683, make nomedia file checking more precise

This commit is contained in:
tibbi 2018-03-02 17:23:38 +01:00
parent 3949db6583
commit 8a0dd4592b

View file

@ -98,7 +98,7 @@ fun Context.getNoMediaFolders(callback: (folders: ArrayList<String>) -> Unit) {
do { do {
val path = cursor.getStringValue(MediaStore.Files.FileColumns.DATA) ?: continue val path = cursor.getStringValue(MediaStore.Files.FileColumns.DATA) ?: continue
val noMediaFile = File(path) val noMediaFile = File(path)
if (noMediaFile.exists()) { if (noMediaFile.exists() && noMediaFile.name == NOMEDIA) {
folders.add("${noMediaFile.parent}/") folders.add("${noMediaFile.parent}/")
} }
} while (cursor.moveToNext()) } while (cursor.moveToNext())