hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit be0314b1d5c21f23b22021c32f153b549a480584
parent e4ed9d6b021a75d060bf598369fdee12b29a89fb
Author: bep <bjorn.erik.pedersen@gmail.com>
Date:   Sun, 31 May 2015 13:13:26 +0200

Fix Windows Ace path issue

Ace doesn't like Windows style filepath separators.

Fixes #1178

Diffstat:
Mtpl/template.go | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/tpl/template.go b/tpl/template.go
@@ -161,6 +161,11 @@ func (t *GoHTMLTemplate) AddTemplate(name, tpl string) error {
 func (t *GoHTMLTemplate) AddAceTemplate(name, basePath, innerPath string, baseContent, innerContent []byte) error {
 	var base, inner *ace.File
 	name = name[:len(name)-len(filepath.Ext(innerPath))] + ".html"
+
+	// Fixes issue #1178
+	basePath = strings.Replace(basePath, "\\", "/", -1)
+	innerPath = strings.Replace(innerPath, "\\", "/", -1)
+
 	if basePath != "" {
 		base = ace.NewFile(basePath, baseContent)
 		inner = ace.NewFile(innerPath, innerContent)