hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit 72ecd0cdc7b02bf55cf86cd13afbbfdc4f72de9c
parent 18d69d7f8c0b7a0694e649ce2da91ab1063c7c88
Author: Scott C Wilson <scottcwilson@gmail.com>
Date:   Sat, 18 Jul 2015 09:14:39 -0400

Ignore non-presence of "layouts" directory in watch logic
Fixes #691

Diffstat:
Mcommands/hugo.go | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/commands/hugo.go b/commands/hugo.go
@@ -343,6 +343,7 @@ 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) {
@@ -350,6 +351,11 @@ func getDirList() []string {
 				return nil
 
 			}
+			if path == layoutDir && os.IsNotExist(err) {
+				jww.WARN.Println("Skip LayoutDir:", err)
+				return nil
+
+			}
 			jww.ERROR.Println("Walker: ", err)
 			return nil
 		}