mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-02-16 20:10:37 +01:00
make sure we filter out empty folders
This commit is contained in:
parent
db278b4aa2
commit
d2e2e315e1
@ -759,6 +759,12 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||
dirs.forEach {
|
||||
if (!getDoesFilePathExist(it.path)) {
|
||||
invalidDirs.add(it)
|
||||
} else {
|
||||
val children = File(it.path).list()
|
||||
val hasMediaFile = children?.any { it.isImageVideoGif() } ?: false
|
||||
if (!hasMediaFile) {
|
||||
invalidDirs.add(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user