Skip to content

Commit

Permalink
Stop using has_trailing_slash
Browse files Browse the repository at this point in the history
It doesn't do what I need it do.
  • Loading branch information
the10thWiz committed Jun 9, 2024
1 parent ef97826 commit b637cfa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/lib/src/fs/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ pub fn filter_dotfiles(file: &File<'_, '_>) -> bool {
/// # }
/// ```
pub fn normalize_dirs<'p, 'h>(file: File<'p, 'h>) -> FileResponse<'p, 'h> {
if !file.full_uri.has_trailing_slash() && file.path.is_dir() {
if !file.full_uri.path().raw().ends_with('/') && file.path.is_dir() {
// Known good path + '/' is a good path
file.into_redirect(|o| o.map_path(|p| format!("{p}/")).unwrap())
} else {
Expand Down

0 comments on commit b637cfa

Please sign in to comment.