fix path error at http
This commit is contained in:
parent
eb9f7b8031
commit
d3e6058862
@ -176,7 +176,7 @@ func ReadFolder(w http.ResponseWriter, r *http.Request, fullpath string, isroot
|
||||
if !v.IsDir() {
|
||||
w.Write([]byte(fmt.Sprintf("<p><a href='%s'>%s</a> %d %s</p>\n", r.URL.Path+"/"+v.Name(), v.Name(), int(v.Size()), v.ModTime().Format("2006-01-02 15:04:05"))))
|
||||
} else {
|
||||
w.Write([]byte(fmt.Sprintf("<p><a href='%s'>%s</a> %s %s</p>\n", v.Name(), v.Name(), "文件夹", v.ModTime().Format("2006-01-02 15:04:05"))))
|
||||
w.Write([]byte(fmt.Sprintf("<p><a href='%s'>%s</a> %s %s</p>\n", r.URL.Path+"/"+v.Name(), v.Name(), "文件夹", v.ModTime().Format("2006-01-02 15:04:05"))))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user