Move FileInfoTruncated to files package

This is where it's used, and it clarifies that it's never used over the
wire.
This commit is contained in:
Jakob Borg
2015-01-09 08:19:32 +01:00
parent 8bc7d259f4
commit 4c4143d9be
11 changed files with 227 additions and 188 deletions

View File

@@ -65,7 +65,7 @@ func NewSet(folder string, db *leveldb.DB) *Set {
ldbCheckGlobals(db, []byte(folder))
var deviceID protocol.DeviceID
ldbWithAllFolderTruncated(db, []byte(folder), func(device []byte, f protocol.FileInfoTruncated) bool {
ldbWithAllFolderTruncated(db, []byte(folder), func(device []byte, f FileInfoTruncated) bool {
copy(deviceID[:], device)
if f.LocalVersion > s.localVersion[deviceID] {
s.localVersion[deviceID] = f.LocalVersion
@@ -232,7 +232,7 @@ func nativeFileIterator(fn Iterator) Iterator {
case protocol.FileInfo:
f.Name = osutil.NativeFilename(f.Name)
return fn(f)
case protocol.FileInfoTruncated:
case FileInfoTruncated:
f.Name = osutil.NativeFilename(f.Name)
return fn(f)
default: