mirror of
https://github.com/syncthing/syncthing.git
synced 2026-12-05 08:12:37 -08:00
chore(model): remove redundant removal of internal fields in indexsender (#10173)
While it doesn't hurt, it's unnecessary since the big protobuf modernisation, that also introduced types separate from the generated ones for internal use. Those fields are already dropped when converting to the wire in protocol.
This commit is contained in:
1 parent
20257faf54
commit
cb7cea93a2
1 file changed
+1
-7
@@ -489,14 +489,8 @@ func prepareFileInfoForIndex(f protocol.FileInfo) protocol.FileInfo {
|
||||
if f.IsReceiveOnlyChanged() {
|
||||
f.Version = protocol.Vector{}
|
||||
}
|
||||
// The trailer with the encrypted fileinfo is device local, don't send info
|
||||
// about that to remotes
|
||||
// The trailer with the encrypted fileinfo is device local, announce the size without it to remotes.
|
||||
f.Size -= int64(f.EncryptionTrailerSize)
|
||||
f.EncryptionTrailerSize = 0
|
||||
// never sent externally
|
||||
f.LocalFlags = 0
|
||||
f.VersionHash = nil
|
||||
f.InodeChangeNs = 0
|
||||
return f
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user