Don't attempt to fetch suppressed files

This commit is contained in:
Jakob Borg 2014-05-20 20:26:14 +02:00
parent 230f149b4b
commit e17fa7b14e
2 changed files with 3 additions and 3 deletions

View File

@ -112,7 +112,7 @@ func (m *Set) Need(id uint) []scanner.File {
var fs = make([]scanner.File, 0, len(m.globalKey)/2) // Just a guess, but avoids too many reallocations var fs = make([]scanner.File, 0, len(m.globalKey)/2) // Just a guess, but avoids too many reallocations
rkID := m.remoteKey[id] rkID := m.remoteKey[id]
for gk, gf := range m.files { for gk, gf := range m.files {
if !gf.Global { if !gf.Global || gf.File.Suppressed {
continue continue
} }

View File

@ -13,8 +13,8 @@ type File struct {
} }
func (f File) String() string { func (f File) String() string {
return fmt.Sprintf("File{Name:%q, Flags:0%o, Modified:%d, Version:%d, Size:%d, NumBlocks:%d}", return fmt.Sprintf("File{Name:%q, Flags:0%o, Modified:%d, Version:%d, Size:%d, NumBlocks:%d, Sup:%v}",
f.Name, f.Flags, f.Modified, f.Version, f.Size, len(f.Blocks)) f.Name, f.Flags, f.Modified, f.Version, f.Size, len(f.Blocks), f.Suppressed)
} }
func (f File) Equals(o File) bool { func (f File) Equals(o File) bool {