mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-01-30 03:04:51 +01:00
filter out symbolic link folders earlier
This commit is contained in:
parent
aa55dfbb15
commit
07e15db08a
@ -61,10 +61,7 @@ class GetDirectoriesAsynctask(val context: Context, val isPickVideo: Boolean, va
|
|||||||
media.sort()
|
media.sort()
|
||||||
|
|
||||||
val directories = groupDirectories(media)
|
val directories = groupDirectories(media)
|
||||||
val dirs = ArrayList(directories.values.filter {
|
val dirs = ArrayList(directories.values.filter { File(it.path).exists() })
|
||||||
val file = File(it.path)
|
|
||||||
file.exists() && file.canonicalFile == file.absoluteFile // filter out symbolic links too
|
|
||||||
})
|
|
||||||
Directory.sorting = config.directorySorting
|
Directory.sorting = config.directorySorting
|
||||||
dirs.sort()
|
dirs.sort()
|
||||||
|
|
||||||
|
@ -75,7 +75,8 @@ fun Context.getParents(): ArrayList<String> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
parentsSet.filterTo(parents, {
|
parentsSet.filterTo(parents, {
|
||||||
if (File(it).isDirectory) {
|
val file = File(it)
|
||||||
|
if (file.isDirectory && file.canonicalFile == file.absoluteFile) { // filter out symbolic links too
|
||||||
if (!config.showHiddenFolders) {
|
if (!config.showHiddenFolders) {
|
||||||
isFolderVisible(it, noMediaFolders)
|
isFolderVisible(it, noMediaFolders)
|
||||||
} else
|
} else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user