mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 14:37:59 +01:00
filter out symbolic links as directories
This commit is contained in:
parent
153c9ed62a
commit
d885f301cb
1 changed files with 4 additions and 1 deletions
|
@ -61,7 +61,10 @@ class GetDirectoriesAsynctask(val context: Context, val isPickVideo: Boolean, va
|
|||
media.sort()
|
||||
|
||||
val directories = groupDirectories(media)
|
||||
val dirs = ArrayList(directories.values.filter { File(it.path).exists() })
|
||||
val dirs = ArrayList(directories.values.filter {
|
||||
val file = File(it.path)
|
||||
file.exists() && file.canonicalFile == file.absoluteFile // filter out symbolic links too
|
||||
})
|
||||
Directory.sorting = config.directorySorting
|
||||
dirs.sort()
|
||||
|
||||
|
|
Loading…
Reference in a new issue