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

@@ -119,12 +119,6 @@ func (t readWriteTransaction) flush() {
}
}
func (t readWriteTransaction) insertFile(fk, folder, device []byte, file protocol.FileInfo) {
l.Debugf("insert; folder=%q device=%v %v", folder, protocol.DeviceIDFromBytes(device), file)
t.Put(fk, mustMarshal(&file))
}
// updateGlobal adds this device+version to the version list for the given
// file. If the device is already present in the list, the version is updated.
// If the file does not have an entry in the global list, it is created.