diff --git a/handler.go b/handler.go index 8c1f3eb..54f90ca 100644 --- a/handler.go +++ b/handler.go @@ -215,7 +215,7 @@ func generateDirectoryListing(path string) string { if uint64(file.Mode().Perm())&0444 != 0444 { continue } - listing += fmt.Sprintf("=> %s %s\n", file.Name(), file.Name()) + listing += fmt.Sprintf("=> %s %s\n", url.PathEscape(file.Name()), file.Name()) } return listing }