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 (#6761)
This commit is contained in:
parent
946170f3fc
commit
22f0077262
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user