|
|
@@ -41,24 +41,7 @@ func (f *sendOnlyFolder) Serve() {
|
|
|
|
|
|
case <-f.scan.timer.C:
|
|
|
l.Debugln(f, "Scanning subdirectories")
|
|
|
- err := f.scanSubdirs(nil)
|
|
|
-
|
|
|
- select {
|
|
|
- case <-f.initialScanFinished:
|
|
|
- default:
|
|
|
- status := "Completed"
|
|
|
- if err != nil {
|
|
|
- status = "Failed"
|
|
|
- }
|
|
|
- l.Infoln(status, "initial scan (ro) of", f.Description())
|
|
|
- close(f.initialScanFinished)
|
|
|
- }
|
|
|
-
|
|
|
- if f.scan.HasNoInterval() {
|
|
|
- continue
|
|
|
- }
|
|
|
-
|
|
|
- f.scan.Reschedule()
|
|
|
+ f.scanTimerFired()
|
|
|
|
|
|
case req := <-f.scan.now:
|
|
|
req.err <- f.scanSubdirs(req.subdirs)
|