diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt index 3ad0ce15d..699fcf19f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt @@ -929,12 +929,12 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { val currentPaths = LinkedHashSet() folders.forEach { val path = it - if (it != internalPath && it != sdPath) { + if (path != internalPath && path != sdPath) { if (folders.any { it != path && (File(path).parent == it || File(it).parent == File(path).parent) }) { - val parent = File(it).parent + val parent = File(path).parent currentPaths.add(parent) } else { - currentPaths.add(it) + currentPaths.add(path) } } }