create content at any level of nesting
authorspf13 <steve.francia@gmail.com>
Fri, 26 Jul 2013 13:28:26 +0000 (09:28 -0400)
committerspf13 <steve.francia@gmail.com>
Fri, 26 Jul 2013 13:28:26 +0000 (09:28 -0400)
hugolib/site.go

index 85ddd65588bf0ebe0999da4dc3c0e5683bd5c4fe..7066dfbf0b58887fae1a22eed6077f7d5f8dea8e 100644 (file)
@@ -414,7 +414,11 @@ func (s *Site) WritePublic(path string, content []byte) {
        path, filename := filepath.Split(path)
 
        path = filepath.FromSlash(s.c.GetAbsPath(filepath.Join(s.c.PublishDir, path)))
-       mkdirIf(path)
+       err := mkdirIf(path)
+
+       if err != nil {
+               fmt.Println(err)
+       }
 
        file, _ := os.Create(filepath.Join(path, filename))
        defer file.Close()