Skip to content

Commit

Permalink
lib/model: Partial revert of rename fix (fixes syncthing#6653) (synct…
Browse files Browse the repository at this point in the history
…hing#6656)

We can't just drop the snap because it's in use elsewhere. This should
be equally functional.
  • Loading branch information
calmh committed May 16, 2020
1 parent 258341f commit 22c222b
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions lib/model/folder.go
Original file line number Diff line number Diff line change
Expand Up @@ -460,13 +460,8 @@ func (f *folder) scanSubdirs(subDirs []string) error {
continue
}

if batch.full() {
if err := batch.flush(); err != nil {
return err
}
snap.Release()
snap = f.fset.Snapshot()
alreadyUsed = make(map[string]struct{})
if err := batch.flushIfFull(); err != nil {
return err
}

batch.append(res.File)
Expand Down

0 comments on commit 22c222b

Please sign in to comment.