Skip to content

Commit

Permalink
fix: fixed user root directory display error
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhu Guoquan committed Feb 18, 2025
1 parent a056230 commit 83f900b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ func (h *Handler) UpdateUsers(c *Config) {
}

handler.User = u
handler.FileSystem = Dir{
Dir: webdav.Dir(u.Directory),
noSniff: c.NoSniff,
}
continue
}

Expand Down Expand Up @@ -144,7 +148,7 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
return
}

user, ok := v.(*handlerUser)
user, ok = v.(*handlerUser)
if !ok {
// Log invalid hander
zap.L().Info("invalid hander", zap.String("username", username), zap.String("remote_address", remoteAddr))
Expand Down

0 comments on commit 83f900b

Please sign in to comment.