diff --git a/pkg/dav/response.go b/pkg/dav/response.go index 69dd133..0f623ae 100644 --- a/pkg/dav/response.go +++ b/pkg/dav/response.go @@ -42,6 +42,10 @@ func VidHubDirectory(path, added string) string { if !strings.HasSuffix(path, "/") { path += "/" } + displayName := html.EscapeString(filepath.Base(path)) + if displayName == "\\" { + displayName = "/" + } return fmt.Sprintf(` %s @@ -54,7 +58,7 @@ func VidHubDirectory(path, added string) string { HTTP/1.1 200 OK -`, customPathEscape(path), html.EscapeString(filepath.Base(path)), added) +`, customPathEscape(path), displayName, added) } func VidHubFile(path string, fileSize int64, added string) string {