If all instances of the global version is invalid, the file should not be on the need list

This commit is contained in:
Jakob Borg
2014-09-01 09:07:51 +02:00
parent 1068eaa0b9
commit bd2772ea4c
3 changed files with 137 additions and 61 deletions

View File

@@ -39,6 +39,10 @@ func (f FileInfo) IsDeleted() bool {
return IsDeleted(f.Flags)
}
func (f FileInfo) IsInvalid() bool {
return IsInvalid(f.Flags)
}
// Used for unmarshalling a FileInfo structure but skipping the actual block list
type FileInfoTruncated struct {
Name string // max:8192
@@ -65,9 +69,14 @@ func (f FileInfoTruncated) IsDeleted() bool {
return IsDeleted(f.Flags)
}
func (f FileInfoTruncated) IsInvalid() bool {
return IsInvalid(f.Flags)
}
type FileIntf interface {
Size() int64
IsDeleted() bool
IsInvalid() bool
}
type BlockInfo struct {