fix path error at http

master
兔子 5 years ago
parent cb997cc49c
commit e27f6d4006

@ -169,7 +169,7 @@ func ReadFolder(w http.ResponseWriter, r *http.Request, fullpath string, isroot
}
w.Write([]byte("<hr /><pre>\n"))
if !isroot {
w.Write([]byte(fmt.Sprintf("<p><a href='%s'>%s</a> %s</p>\n", "..", "..", "上层文件夹")))
w.Write([]byte(fmt.Sprintf("<p><a href='%s'>%s</a> %s</p>\n", r.URL.Path+"/..", "..", "上层文件夹")))
}
if r.URL.Path == "/" {
r.URL.Path = ""

Loading…
Cancel
Save