mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 13:10:54 +00:00
fix window's slash
This commit is contained in:
parent
b6df895df8
commit
3c4dd99fbe
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user