fix(db): remove invalid member from FileMetadata (#10180)
This commit is contained in:
@@ -103,7 +103,6 @@ type FileMetadata struct {
|
|||||||
LocalFlags protocol.FlagLocal
|
LocalFlags protocol.FlagLocal
|
||||||
Type protocol.FileInfoType
|
Type protocol.FileInfoType
|
||||||
Deleted bool
|
Deleted bool
|
||||||
Invalid bool
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *FileMetadata) ModTime() time.Time {
|
func (f *FileMetadata) ModTime() time.Time {
|
||||||
@@ -121,3 +120,7 @@ func (f *FileMetadata) IsDirectory() bool {
|
|||||||
func (f *FileMetadata) ShouldConflict() bool {
|
func (f *FileMetadata) ShouldConflict() bool {
|
||||||
return f.LocalFlags&protocol.LocalConflictFlags != 0
|
return f.LocalFlags&protocol.LocalConflictFlags != 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (f *FileMetadata) IsInvalid() bool {
|
||||||
|
return f.LocalFlags.IsInvalid()
|
||||||
|
}
|
||||||
|
|||||||
+1
-1
@@ -2757,7 +2757,7 @@ func (m *model) GlobalDirectoryTree(folder, prefix string, levels int, dirsOnly
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Don't include the prefix itself.
|
// 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
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user