Merge pull request #443 from hupfdule/more-symlinks
Treat symlinks to directories like directories
This commit is contained in:
commit
8fd81288d7
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue