|
@ -116,16 +116,17 @@ func (fsStatus *FilesystemStatus) parseFile(indexBucket, picksBucket *bolt.Bucke |
|
|
|
|
|
|
|
|
defer func() { |
|
|
defer func() { |
|
|
bar.Increment() |
|
|
bar.Increment() |
|
|
|
|
|
fsStatusWG.Done() |
|
|
}() |
|
|
}() |
|
|
|
|
|
|
|
|
|
|
|
fsStatusWG.Wait() |
|
|
|
|
|
fsStatusWG.Add(1) |
|
|
|
|
|
|
|
|
pick = picksBucket.Get([]byte(p)) |
|
|
pick = picksBucket.Get([]byte(p)) |
|
|
known = indexBucket.Get([]byte(p)) |
|
|
known = indexBucket.Get([]byte(p)) |
|
|
|
|
|
|
|
|
if pick != nil { |
|
|
if pick != nil { |
|
|
fsStatusWG.Wait() |
|
|
|
|
|
fsStatusWG.Add(1) |
|
|
|
|
|
fsStatus.PickedFiles = append(fsStatus.PickedFiles, p) |
|
|
fsStatus.PickedFiles = append(fsStatus.PickedFiles, p) |
|
|
fsStatusWG.Done() |
|
|
|
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -142,10 +143,7 @@ func (fsStatus *FilesystemStatus) parseFile(indexBucket, picksBucket *bolt.Bucke |
|
|
|
|
|
|
|
|
e = newFileObject.IsDifferent(knownFileObject) |
|
|
e = newFileObject.IsDifferent(knownFileObject) |
|
|
if e != nil { |
|
|
if e != nil { |
|
|
fsStatusWG.Wait() |
|
|
|
|
|
fsStatusWG.Add(1) |
|
|
|
|
|
fsStatus.ModifiedFiles = append(fsStatus.ModifiedFiles, p) |
|
|
fsStatus.ModifiedFiles = append(fsStatus.ModifiedFiles, p) |
|
|
fsStatusWG.Done() |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return |
|
|
return |
|
|