diff --git a/internal/webdav/handler.go b/internal/webdav/handler.go index 4e8bee0..b395aba 100644 --- a/internal/webdav/handler.go +++ b/internal/webdav/handler.go @@ -14,7 +14,7 @@ import ( // NewHandler returns an http.Handler that provides standard WebDAV file access, // mounted at the fixed URL /files/ for every user and rooted at -// dataDir/files// on disk. The URL is the same for all users — +// dataDir//files/ on disk. The URL is the same for all users — // which user's directory is served is resolved from the Basic Auth identity // in the request context, not from the URL. // @@ -38,7 +38,7 @@ func NewHandler(cfg *config.Config, dataDir string, logger *slog.Logger) http.Ha h, ok := handlers[p.Username] if !ok { username := p.Username - userDir := filepath.Join(dataDir, "files", username) + userDir := filepath.Join(dataDir, username, "files") if err := os.MkdirAll(userDir, 0o755); err != nil { mu.Unlock() logger.Error("creating user WebDAV dir", "user", username, "error", err)