diff --git a/lib/scanner/walk.go b/lib/scanner/walk.go index e25050464..1ddd78104 100644 --- a/lib/scanner/walk.go +++ b/lib/scanner/walk.go @@ -281,8 +281,11 @@ func (w *walker) walkAndHashFiles(fchan, dchan chan protocol.FileInfo) filepath. if err := w.walkSymlink(absPath, relPath, dchan); err != nil { return err } - // under no circumstances shall we descend into a symlink - return filepath.SkipDir + if info.IsDir() { + // under no circumstances shall we descend into a symlink + return filepath.SkipDir + } + return nil case info.Mode().IsDir(): err = w.walkDir(relPath, info, dchan)