From 4e212fe2a5f784f4076e7333f72b7c0aa09e1b70 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Sat, 10 Oct 2015 10:25:02 +0100 Subject: [PATCH] fix settings bug --- cms.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cms.go b/cms.go index 53f92b2c..72da5d1b 100644 --- a/cms.go +++ b/cms.go @@ -72,15 +72,15 @@ func (h CaddyCMS) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) if r.URL.Path == "/admin/settings/" { var frontmatter string - if _, err := os.Stat("config.yaml"); err == nil { + if _, err := os.Stat(h.Config.Path + "config.yaml"); err == nil { frontmatter = "yaml" } - if _, err := os.Stat("config.json"); err == nil { + if _, err := os.Stat(h.Config.Path + "config.json"); err == nil { frontmatter = "json" } - if _, err := os.Stat("config.toml"); err == nil { + if _, err := os.Stat(h.Config.Path + "config.toml"); err == nil { frontmatter = "toml" }