diff --git a/vtqe/tools/http.go b/vtqe/tools/http.go index 8c399ed..64c64ad 100644 --- a/vtqe/tools/http.go +++ b/vtqe/tools/http.go @@ -171,6 +171,9 @@ func ReadFolder(w http.ResponseWriter, r *http.Request, fullpath string, isroot if !isroot { w.Write([]byte(fmt.Sprintf("

%s %s

\n", "..", "..", "上层文件夹"))) } + if r.URL.Path == "/" { + r.URL.Path = "" + } for _, v := range dir { if v.Name() != "." || v.Name() != ".." { if !v.IsDir() {