fix(db): remove invalid member from FileMetadata (#10180)

This commit is contained in:
Simon Frei
2025-06-15 07:12:25 +00:00
committed by GitHub
parent e4ab7b4ff3
commit 71c8a2c36f
2 changed files with 5 additions and 2 deletions

View File

@@ -103,7 +103,6 @@ type FileMetadata struct {
LocalFlags protocol.FlagLocal
Type protocol.FileInfoType
Deleted bool
Invalid bool
}
func (f *FileMetadata) ModTime() time.Time {
@@ -121,3 +120,7 @@ func (f *FileMetadata) IsDirectory() bool {
func (f *FileMetadata) ShouldConflict() bool {
return f.LocalFlags&protocol.LocalConflictFlags != 0
}
func (f *FileMetadata) IsInvalid() bool {
return f.LocalFlags.IsInvalid()
}

View File

@@ -2757,7 +2757,7 @@ func (m *model) GlobalDirectoryTree(folder, prefix string, levels int, dirsOnly
}
// Don't include the prefix itself.
if f.Invalid || f.Deleted || strings.HasPrefix(prefix, f.Name) {
if f.IsInvalid() || f.Deleted || strings.HasPrefix(prefix, f.Name) {
continue
}