Ignore non-presence of "layouts" directory in watch logic

Fixes #691
This commit is contained in:
Scott C Wilson 2015-07-18 09:14:39 -04:00 committed by Bjørn Erik Pedersen
parent 18d69d7f8c
commit 72ecd0cdc7

View file

@ -343,12 +343,18 @@ func copyStatic() error {
func getDirList() []string {
var a []string
dataDir := helpers.AbsPathify(viper.GetString("DataDir"))
layoutDir := helpers.AbsPathify(viper.GetString("LayoutDir"))
walker := func(path string, fi os.FileInfo, err error) error {
if err != nil {
if path == dataDir && os.IsNotExist(err) {
jww.WARN.Println("Skip DataDir:", err)
return nil
}
if path == layoutDir && os.IsNotExist(err) {
jww.WARN.Println("Skip LayoutDir:", err)
return nil
}
jww.ERROR.Println("Walker: ", err)
return nil