🐛 fix nil pointer

This commit is contained in:
Xhofe
2022-02-16 16:10:39 +08:00
parent 693417be4f
commit cb53ddc8e8
2 changed files with 4 additions and 2 deletions

View File

@ -238,8 +238,8 @@ func (h *Handler) handleGetHeadPost(w http.ResponseWriter, r *http.Request, fs *
w.Header().Set("ETag", etag)
log.Debugf("url: %+v", r.URL)
link, err := fs.Link(w, r, reqPath)
log.Debugf("webdav link error: %s", err.Error())
if err != nil {
log.Debugf("webdav link error: %s", err.Error())
return http.StatusInternalServerError, err
}
if link != "" {