Skip to content

Commit

Permalink
fix(webdav): incorrect href if base_path isn't root (close #1629)
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Sep 10, 2022
1 parent 8d4d864 commit 57bcd37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/webdav/webdav.go
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ func (h *Handler) handlePropfind(w http.ResponseWriter, r *http.Request) (status
if err != nil {
return err
}
href := path.Join(h.Prefix, reqPath)
href := path.Join(h.Prefix, strings.TrimPrefix(reqPath, user.BasePath))
if href != "/" && info.IsDir() {
href += "/"
}
Expand Down

0 comments on commit 57bcd37

Please sign in to comment.