summaryrefslogtreecommitdiffstats
path: root/files
diff options
context:
space:
mode:
authorJakob Borg <jakob@nym.se>2014-05-19 22:31:28 +0200
committerJakob Borg <jakob@nym.se>2014-05-19 22:31:28 +0200
commitdba40eefb1900db524cf3bb23b1621d9fddcb6c0 (patch)
tree90f19c91b1bcceafa63669b9db015caa472b4250 /files
parent23b55f68b7bf746675e8feedac06274b72e51017 (diff)
Fix handling of changed/deleted directories (fixes #231)
Diffstat (limited to 'files')
-rw-r--r--files/set.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/files/set.go b/files/set.go
index 5c70d79cbe..2092557243 100644
--- a/files/set.go
+++ b/files/set.go
@@ -116,12 +116,8 @@ func (m *Set) Need(id uint) []scanner.File {
continue
}
- file := gf.File
- switch {
- case file.Flags&protocol.FlagDirectory == 0 && gk.newerThan(rkID[gk.Name]):
- fs = append(fs, file)
- case file.Flags&(protocol.FlagDirectory|protocol.FlagDeleted) == protocol.FlagDirectory && gk.newerThan(rkID[gk.Name]):
- fs = append(fs, file)
+ if gk.newerThan(rkID[gk.Name]) {
+ fs = append(fs, gf.File)
}
}
m.Unlock()