ref: 736677a21d8b10c3a34c5f383849ba186ff296b1
parent: 7ab28c564f89b32fd1a3db78a34db14587f54cad
author: spf13 <[email protected]>
date: Fri Jul 26 14:10:03 EDT 2013
Using MkdirAll instead of my own logic
--- a/hugolib/helpers.go
+++ b/hugolib/helpers.go
@@ -19,7 +19,6 @@
"github.com/kr/pretty"
"html/template"
"os"
- "path/filepath"
"reflect"
"regexp"
"strconv"
@@ -139,24 +138,7 @@
}
func mkdirIf(path string) error {
- err := os.Mkdir(path, 0777)
- if err != nil {
- if os.IsExist(err) {
- return nil
- }
- if os.IsNotExist(err) {
- parent, _ := filepath.Split(path)
- err2 := mkdirIf(parent)
- if err2 != nil {
- return err2
- } else {
- return mkdirIf(path)
- }
- }
- return err
- }
-
- return nil
+ return os.MkdirAll(path, 0777)
}
func Urlize(url string) string {