Avoid havoc when discovering locally-deleted-upgraded files during repair / need calculation... Co-authored-by: Simon Frei <freisim93@gmail.com>
This commit is contained in:
@@ -189,10 +189,6 @@ func WinsConflict(f, other FileIntf) bool {
|
||||
return f.FileVersion().Compare(other.FileVersion()) == ConcurrentGreater
|
||||
}
|
||||
|
||||
func (f FileInfo) IsEmpty() bool {
|
||||
return f.Version.Counters == nil
|
||||
}
|
||||
|
||||
func (f FileInfo) IsEquivalent(other FileInfo, modTimeWindow time.Duration) bool {
|
||||
return f.isEquivalent(other, modTimeWindow, false, false, 0)
|
||||
}
|
||||
|
||||
@@ -127,6 +127,11 @@ func (v Vector) Counter(id ShortID) uint64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
// IsEmpty returns true when there are no counters.
|
||||
func (v Vector) IsEmpty() bool {
|
||||
return len(v.Counters) == 0
|
||||
}
|
||||
|
||||
// DropOthers removes all counters, keeping only the one with given id. If there
|
||||
// is no such counter, an empty Vector is returned.
|
||||
func (v Vector) DropOthers(id ShortID) Vector {
|
||||
|
||||
Reference in New Issue
Block a user