lib/model: Handle type changes when pulling (ref #4505 #4506 #4507)

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4509
LGTM: AudriusButkevicius, calmh
This commit is contained in:
Simon Frei
2017-11-13 15:16:27 +00:00
committed by Jakob Borg
parent 2b65e1062e
commit fa12a18190
2 changed files with 36 additions and 18 deletions

View File

@@ -392,7 +392,6 @@ func (w *walker) walkSymlink(ctx context.Context, relPath string, dchan chan pro
// - it wasn't deleted (because it isn't now)
// - it was a symlink
// - it wasn't invalid
// - the symlink type (file/dir) was the same
// - the target was the same
cf, ok := w.CurrentFiler.CurrentFile(relPath)
if ok && !cf.IsDeleted() && cf.IsSymlink() && !cf.IsInvalid() && cf.SymlinkTarget == target {