diff options
author | Sven-Hendrik Haase <svenstaro@gmail.com> | 2023-02-21 12:32:21 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-21 12:32:21 +0000 |
commit | 8dc14ed4cec04038cff5348d92f71b841c9dd337 (patch) | |
tree | 9edebf49b1e336880f687b4372ff460ae34d466f /src | |
parent | Merge pull request #1041 from svenstaro/dependabot/cargo/grass-0.12.3 (diff) | |
parent | [fix] Sorting breaks subdir downloading (diff) | |
download | miniserve-8dc14ed4cec04038cff5348d92f71b841c9dd337.tar.gz miniserve-8dc14ed4cec04038cff5348d92f71b841c9dd337.zip |
Merge pull request #991 from Vam-Jam/sort_down_fix
[fix] Sorting breaks subdir downloading
Diffstat (limited to 'src')
-rw-r--r-- | src/renderer.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/renderer.rs b/src/renderer.rs index 7da7392..60d63f7 100644 --- a/src/renderer.rs +++ b/src/renderer.rs @@ -411,7 +411,7 @@ fn archive_button( /// Ensure that there's always a trailing slash behind the `link`. fn make_link_with_trailing_slash(link: &str) -> String { - if link.ends_with('/') { + if link.is_empty() || link.ends_with('/') { link.to_string() } else { format!("{link}/") |