mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-06 16:44:04 +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)
|
f.setState(FolderScanWaiting)
|
||||||
|
defer f.setState(FolderIdle)
|
||||||
|
|
||||||
if err := f.ioLimiter.takeWithContext(f.ctx, 1); err != nil {
|
if err := f.ioLimiter.takeWithContext(f.ctx, 1); err != nil {
|
||||||
return err
|
return err
|
||||||
@ -627,7 +628,6 @@ func (f *folder) scanSubdirs(subDirs []string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
f.ScanCompleted()
|
f.ScanCompleted()
|
||||||
f.setState(FolderIdle)
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user