From 8a0dd4592baa2c097d61e88f3d3afb0df6c8d73d Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 2 Mar 2018 17:23:38 +0100 Subject: [PATCH] fix #683, make nomedia file checking more precise --- .../kotlin/com/simplemobiletools/gallery/extensions/Context.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Context.kt index 4d3ac9961..248881172 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Context.kt @@ -98,7 +98,7 @@ fun Context.getNoMediaFolders(callback: (folders: ArrayList) -> Unit) { do { val path = cursor.getStringValue(MediaStore.Files.FileColumns.DATA) ?: continue val noMediaFile = File(path) - if (noMediaFile.exists()) { + if (noMediaFile.exists() && noMediaFile.name == NOMEDIA) { folders.add("${noMediaFile.parent}/") } } while (cursor.moveToNext())