lib/model: Partial revert of rename fix (fixes #6653) (#6656)

We can't just drop the snap because it's in use elsewhere. This should
be equally functional.
This commit is contained in:
Jakob Borg 2020-05-16 23:05:33 +02:00 committed by GitHub
parent 5c9dc4c883
commit 651ee2ce74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -460,14 +460,9 @@ func (f *folder) scanSubdirs(subDirs []string) error {
continue
}
if batch.full() {
if err := batch.flush(); err != nil {
if err := batch.flushIfFull(); err != nil {
return err
}
snap.Release()
snap = f.fset.Snapshot()
alreadyUsed = make(map[string]struct{})
}
batch.append(res.File)
changes++