Only do initial scan if scanInterval==0 (fixes #856)

This commit is contained in:
Jakob Borg 2014-10-15 10:51:09 +02:00
parent 8a674c8bc3
commit a778b410b9
2 changed files with 7 additions and 1 deletions

View File

@ -190,7 +190,9 @@ loop:
break loop
}
p.model.setState(p.folder, FolderIdle)
scanTimer.Reset(p.scanIntv)
if p.scanIntv > 0 {
scanTimer.Reset(p.scanIntv)
}
if !initialScanCompleted {
l.Infoln("Completed initial scan (rw) of folder", p.folder)
initialScanCompleted = true

View File

@ -59,6 +59,10 @@ func (s *Scanner) Serve() {
initialScanCompleted = true
}
if s.intv == 0 {
return
}
timer.Reset(s.intv)
}
}