fix path error at http

master
兔子 5 years ago
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…
Cancel
Save