lib/scanner, lib/model: Actually assign version when un-ignoring (fixes #4841) (#4842)

This fixes a mistake introduced in #4750 and #4776 and is relevant to v0.14.46-rc1
This commit is contained in:
Simon Frei
2018-03-27 22:24:20 +02:00
committed by Jakob Borg
parent 59802c3981
commit 69f2c26d50
4 changed files with 96 additions and 4 deletions

View File

@@ -308,7 +308,7 @@ func (w *walker) walkRegular(ctx context.Context, relPath string, info fs.FileIn
// currently have. Keeping only our local counter makes sure we are in
// conflict with any other existing versions, which will be resolved by
// the normal pulling mechanisms.
f.Version.DropOthers(w.ShortID)
f.Version = f.Version.DropOthers(w.ShortID)
}
l.Debugln("rescan:", cf, info.ModTime().Unix(), info.Mode()&fs.ModePerm)
}
@@ -347,7 +347,7 @@ func (w *walker) walkDir(ctx context.Context, relPath string, info fs.FileInfo,
// currently have. Keeping only our local counter makes sure we are in
// conflict with any other existing versions, which will be resolved by
// the normal pulling mechanisms.
f.Version.DropOthers(w.ShortID)
f.Version = f.Version.DropOthers(w.ShortID)
}
}
@@ -402,7 +402,7 @@ func (w *walker) walkSymlink(ctx context.Context, relPath string, dchan chan pro
// currently have. Keeping only our local counter makes sure we are in
// conflict with any other existing versions, which will be resolved by
// the normal pulling mechanisms.
f.Version.DropOthers(w.ShortID)
f.Version = f.Version.DropOthers(w.ShortID)
}
}