Merge pull request #443 from hupfdule/more-symlinks

Treat symlinks to directories like directories
This commit is contained in:
Viktor Strate Kløvedal
2021-07-21 15:13:17 +02:00
committed by GitHub

View File

@@ -256,7 +256,14 @@ func directoryContainsPhotos(rootPath string, cache *scanner_cache.AlbumScannerC
for _, fileInfo := range dirContent {
filePath := path.Join(dirPath, fileInfo.Name())
if fileInfo.IsDir() {
isDirSymlink, err := utils.IsDirSymlink(filePath)
if err != nil {
log.Printf("Cannot detect whether %s is symlink to a directory. Pretending it is not", filePath)
isDirSymlink = false
}
if fileInfo.IsDir() || isDirSymlink {
scanQueue.PushBack(filePath)
} else {
if cache.IsPathMedia(filePath) {