We can't just drop the snap because it's in use elsewhere. This should be equally functional.
This commit is contained in:
+2
-7
@@ -460,13 +460,8 @@ func (f *folder) scanSubdirs(subDirs []string) error {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if batch.full() {
|
if err := batch.flushIfFull(); err != nil {
|
||||||
if err := batch.flush(); err != nil {
|
return err
|
||||||
return err
|
|
||||||
}
|
|
||||||
snap.Release()
|
|
||||||
snap = f.fset.Snapshot()
|
|
||||||
alreadyUsed = make(map[string]struct{})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
batch.append(res.File)
|
batch.append(res.File)
|
||||||
|
|||||||
Reference in New Issue
Block a user