diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt index 8cc83bb5d..a795756e5 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt @@ -221,7 +221,7 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: MutableList() selectedPositions.forEach { val dir = File(dirs[it].path) - paths.addAll(dir.list().filter { !activity.getIsPathDirectory(it) && it.isImageVideoGif() }) + paths.addAll(dir.listFiles().filter { !activity.getIsPathDirectory(it.absolutePath) && it.absolutePath.isImageVideoGif() }.map { it.absolutePath }) } val fileDirItems = paths.map { FileDirItem(it, it.getFilenameFromPath()) } as ArrayList