Commit 3c4dd99f authored by astaxie's avatar astaxie

fix window's slash

parent b6df895d
......@@ -140,9 +140,10 @@ func (self *templatefile) visit(paths string, f os.FileInfo, err error) error {
}
}
if hasExt {
replace := strings.NewReplacer("\\", "/")
a := []byte(paths)
a = a[len([]byte(self.root)):]
subdir := path.Dir(strings.TrimLeft(string(a), "/"))
subdir := path.Dir(replace.Replace(strings.TrimLeft(string(a), "/")))
if _, ok := self.files[subdir]; ok {
self.files[subdir] = append(self.files[subdir], paths)
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment