all: Add invalid/ignored files to global list, announce to peers (fixes #623)
This lets us determine accurate completion status for remote peers when they have ignored files. GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4460
This commit is contained in:
@@ -113,6 +113,13 @@ func (f FileInfo) WinsConflict(other FileInfo) bool {
|
||||
return f.Version.Compare(other.Version) == ConcurrentGreater
|
||||
}
|
||||
|
||||
func (f *FileInfo) Invalidate(invalidatedBy ShortID) {
|
||||
f.Invalid = true
|
||||
f.ModifiedBy = invalidatedBy
|
||||
f.Blocks = nil
|
||||
f.Sequence = 0
|
||||
}
|
||||
|
||||
func (b BlockInfo) String() string {
|
||||
return fmt.Sprintf("Block{%d/%d/%d/%x}", b.Offset, b.Size, b.WeakHash, b.Hash)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user