fix archtypes

This commit is contained in:
Henrique Dias 2016-02-08 08:03:32 +00:00
parent 31651e7a32
commit 55a6632934

View File

@ -56,7 +56,7 @@ func POST(w http.ResponseWriter, r *http.Request, c *config.Config) (int, error)
archetype = strings.Replace(archetype, "archetypes", "", 1)
archetype = strings.TrimPrefix(archetype, "/")
archetype = strings.TrimSuffix(archetype, "/")
archetype = "archetypes/" + archetype
archetype = c.Path + "archetypes/" + archetype
// Check if the archetype ending with .markdown exists
if _, err := os.Stat(archetype + ".markdown"); err == nil {