lib/db: Various polish (#5471)

naming: buf -> keyBuf
dedup: use getFileTrunc
manually inline insertFile
This commit is contained in:
Simon Frei
2019-01-20 10:24:39 +01:00
committed by Jakob Borg
parent 29e4b417f2
commit a371b15398
4 changed files with 15 additions and 27 deletions

View File

@@ -163,12 +163,12 @@ func (s *FileSet) Update(device protocol.DeviceID, fs []protocol.FileInfo) {
fs = fs[:0]
folder := []byte(s.folder)
for _, nf := range oldFs {
ef, ok := s.db.getFileDirty(folder, device[:], []byte(osutil.NormalizedFilename(nf.Name)))
ef, ok := s.db.getFileDirty(folder, device[:], []byte(nf.Name))
if ok && unchanged(nf, ef) {
continue
}
nf.Sequence = s.meta.nextSeq(protocol.LocalDeviceID)
nf.Sequence = s.meta.nextLocalSeq()
fs = append(fs, nf)
if ok {