fix: track invalid files in LocalFlags to fix global count (#10170)

Move the "invalid" bit to a local flag, making it easier to track in counts etc.
This commit is contained in:
Simon Frei
2025-06-13 07:33:31 +02:00
committed by GitHub
parent cb7cea93a2
commit 7b319111d3
19 changed files with 132 additions and 70 deletions
-2
View File
@@ -481,8 +481,6 @@ func (s *indexHandler) logSequenceAnomaly(msg string, extra map[string]any) {
}
func prepareFileInfoForIndex(f protocol.FileInfo) protocol.FileInfo {
// Mark the file as invalid if any of the local bad stuff flags are set.
f.RawInvalid = f.IsInvalid()
// If the file is marked LocalReceive (i.e., changed locally on a
// receive only folder) we do not want it to ever become the
// globally best version, invalid or not.