refactor(scanner): make the watcher a little easier to reason about (#394)
* add a test for symlinks escaping defined music paths * refactor(scanner): make the watcher a little easier to reason about
This commit is contained in:
@@ -300,12 +300,13 @@ func main() {
|
||||
|
||||
defer logJob("scan watcher")()
|
||||
|
||||
done := make(chan struct{})
|
||||
errgrp.Go(func() error {
|
||||
<-ctx.Done()
|
||||
scannr.CancelWatch()
|
||||
done <- struct{}{}
|
||||
return nil
|
||||
})
|
||||
return scannr.ExecuteWatch()
|
||||
return scannr.ExecuteWatch(done)
|
||||
})
|
||||
|
||||
errgrp.Go(func() error {
|
||||
|
||||
Reference in New Issue
Block a user