diff options
author | Joel Scoble <[email protected]> | 2014-11-06 09:51:14 -0600 |
---|---|---|
committer | spf13 <[email protected]> | 2014-11-13 22:33:39 -0500 |
commit | 7badd2eb0c4a300f8cbbf88b9ec83cd31f193598 (patch) | |
tree | 8881b7ca03d686cba1f9c8529d190c63b7dd50ca /create | |
parent | 05300fde1d0ff8d8fe032b4300078ab79926a8de (diff) | |
download | hugo-7badd2eb0c4a300f8cbbf88b9ec83cd31f193598.tar.gz hugo-7badd2eb0c4a300f8cbbf88b9ec83cd31f193598.zip |
change path usage to filepath
Diffstat (limited to 'create')
-rw-r--r-- | create/content.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/create/content.go b/create/content.go index 99e866da3..f1a2a3350 100644 --- a/create/content.go +++ b/create/content.go @@ -17,7 +17,7 @@ import ( "bytes" "io/ioutil" "os" - "path" + "path/filepath" "strings" "time" @@ -99,10 +99,10 @@ func NewContent(kind, name string) (err error) { //page.Dir = viper.GetString("sourceDir") page.SetSourceMetaData(newmetadata, parser.FormatToLeadRune(viper.GetString("MetaDataFormat"))) page.SetSourceContent(psr.Content()) - if err = page.SafeSaveSourceAs(path.Join(viper.GetString("contentDir"), name)); err != nil { + if err = page.SafeSaveSourceAs(filepath.Join(viper.GetString("contentDir"), name)); err != nil { return } - jww.FEEDBACK.Println(helpers.AbsPathify(path.Join(viper.GetString("contentDir"), name)), "created") + jww.FEEDBACK.Println(helpers.AbsPathify(filepath.Join(viper.GetString("contentDir"), name)), "created") return nil } @@ -111,7 +111,7 @@ func FindArchetype(kind string) (outpath string) { search := []string{helpers.AbsPathify(viper.GetString("archetypeDir"))} if viper.GetString("theme") != "" { - themeDir := path.Join(helpers.AbsPathify("themes/"+viper.GetString("theme")), "/archetypes/") + themeDir := filepath.Join(helpers.AbsPathify("themes/"+viper.GetString("theme")), "/archetypes/") if _, err := os.Stat(themeDir); os.IsNotExist(err) { jww.ERROR.Println("Unable to find archetypes directory for theme :", viper.GetString("theme"), "in", themeDir) } else { @@ -131,7 +131,7 @@ func FindArchetype(kind string) (outpath string) { pathsToCheck = []string{kind + ".md", kind, "default.md", "default"} } for _, p := range pathsToCheck { - curpath := path.Join(x, p) + curpath := filepath.Join(x, p) jww.DEBUG.Println("checking", curpath, "for archetypes") if exists, _ := helpers.Exists(curpath, hugofs.SourceFs); exists { jww.INFO.Println("curpath: " + curpath) |