1
0
mirror of https://github.com/octoleo/syncthing.git synced 2025-01-02 14:42:00 +00:00

lib/model: Don't stay scanning forever on fail ()

This commit is contained in:
Simon Frei 2020-06-18 15:13:46 +02:00 committed by GitHub
parent 946170f3fc
commit 22f0077262
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -361,6 +361,7 @@ func (f *folder) scanSubdirs(subDirs []string) error {
}()
f.setState(FolderScanWaiting)
defer f.setState(FolderIdle)
if err := f.ioLimiter.takeWithContext(f.ctx, 1); err != nil {
return err
@ -627,7 +628,6 @@ func (f *folder) scanSubdirs(subDirs []string) error {
}
f.ScanCompleted()
f.setState(FolderIdle)
return nil
}