fix(webdav): incorrect href if base_path isn't root (close #1629)

pull/1831/head
Noah Hsu 2022-09-10 19:27:34 +08:00
parent 8d4d8648c6
commit 57bcd376b4
1 changed files with 1 additions and 1 deletions

View File

@ -597,7 +597,7 @@ func (h *Handler) handlePropfind(w http.ResponseWriter, r *http.Request) (status
if err != nil { if err != nil {
return err return err
} }
href := path.Join(h.Prefix, reqPath) href := path.Join(h.Prefix, strings.TrimPrefix(reqPath, user.BasePath))
if href != "/" && info.IsDir() { if href != "/" && info.IsDir() {
href += "/" href += "/"
} }