lib/scanner: Correctly scan symlinks (fixes #3445)

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3446
This commit is contained in:
Jakob Borg
2016-07-26 11:55:25 +00:00
parent 25a7b0a6f8
commit 66a506e72b
2 changed files with 51 additions and 1 deletions

View File

@@ -394,7 +394,7 @@ func (w *walker) walkSymlink(absPath, relPath string, dchan chan protocol.FileIn
return true, nil
}
blocks, err := Blocks(strings.NewReader(target), w.BlockSize, 0, nil)
blocks, err := Blocks(strings.NewReader(target), w.BlockSize, -1, nil)
if err != nil {
l.Debugln("hash link error:", absPath, err)
return true, nil