Skip to content

Commit b637cfa

Browse files
committed
Stop using has_trailing_slash
It doesn't do what I need it do.
1 parent ef97826 commit b637cfa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/lib/src/fs/server.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ pub fn filter_dotfiles(file: &File<'_, '_>) -> bool {
353353
/// # }
354354
/// ```
355355
pub fn normalize_dirs<'p, 'h>(file: File<'p, 'h>) -> FileResponse<'p, 'h> {
356-
if !file.full_uri.has_trailing_slash() && file.path.is_dir() {
356+
if !file.full_uri.path().raw().ends_with('/') && file.path.is_dir() {
357357
// Known good path + '/' is a good path
358358
file.into_redirect(|o| o.map_path(|p| format!("{p}/")).unwrap())
359359
} else {

0 commit comments

Comments
 (0)