From 23cb97d314f30e6012e9d173425f9d57b31d98b7 Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Fri, 10 May 2019 09:31:10 +0900 Subject: [PATCH 1/2] Fix windows paths --- cmd/templates.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/templates.go b/cmd/templates.go index 55e8c63df..d66b7d2d0 100644 --- a/cmd/templates.go +++ b/cmd/templates.go @@ -63,7 +63,7 @@ func NewTemplateList(filenames *mewnlib.FileGroup) *TemplateList { if err != nil { log.Fatalf("corrupt metadata for template: %s", filename) } - path := strings.Split(filename, string(filepath.Separator))[0] + path := strings.Split(filepath.FromSlash(filename), string(filepath.Separator))[0] thisTemplate := &TemplateDetails{Path: path, Metadata: &metadata} result.details[filename] = thisTemplate }) From 76499b20c49313371589a7cd3edb173520a44067 Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Sat, 11 May 2019 17:04:42 +1000 Subject: [PATCH 2/2] fix: windows template.json --- cmd/templates.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/templates.go b/cmd/templates.go index 0a2c3190c..66ff3d55a 100644 --- a/cmd/templates.go +++ b/cmd/templates.go @@ -107,6 +107,7 @@ func (t *TemplateHelper) InstallTemplate(projectPath string, projectOptions *Pro templateJSONFilename := filepath.Join(templatePath, "template.json") templateFiles := templateFilenames.Filter(func(filename string) bool { + filename = filepath.FromSlash(filename) return strings.HasPrefix(filename, templatePath) && filename != templateJSONFilename })