Commit dce0ccf4 authored by Maran's avatar Maran

Don't silently fail on watcher creation

parent e6a428f8
...@@ -8,7 +8,6 @@ import ( ...@@ -8,7 +8,6 @@ import (
"github.com/go-qml/qml" "github.com/go-qml/qml"
"github.com/howeyc/fsnotify" "github.com/howeyc/fsnotify"
"io/ioutil" "io/ioutil"
"log"
"net/url" "net/url"
"os" "os"
"path" "path"
...@@ -77,11 +76,13 @@ func (app *HtmlApplication) NewWatcher(quitChan chan bool) { ...@@ -77,11 +76,13 @@ func (app *HtmlApplication) NewWatcher(quitChan chan bool) {
app.watcher, err = fsnotify.NewWatcher() app.watcher, err = fsnotify.NewWatcher()
if err != nil { if err != nil {
logger.Infoln("Could not create new auto-reload watcher:", err)
return return
} }
err = app.watcher.Watch(app.RootFolder()) err = app.watcher.Watch(app.RootFolder())
if err != nil { if err != nil {
log.Fatal(err) logger.Infoln("Could not start auto-reload watcher:", err)
return
} }
for _, folder := range app.RecursiveFolders() { for _, folder := range app.RecursiveFolders() {
fullPath := app.RootFolder() + "/" + folder.Name() fullPath := app.RootFolder() + "/" + folder.Name()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment