aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven-Hendrik Haase <svenstaro@gmail.com>2023-02-21 12:32:21 +0000
committerGitHub <noreply@github.com>2023-02-21 12:32:21 +0000
commit8dc14ed4cec04038cff5348d92f71b841c9dd337 (patch)
tree9edebf49b1e336880f687b4372ff460ae34d466f
parentMerge pull request #1041 from svenstaro/dependabot/cargo/grass-0.12.3 (diff)
parent[fix] Sorting breaks subdir downloading (diff)
downloadminiserve-8dc14ed4cec04038cff5348d92f71b841c9dd337.tar.gz
miniserve-8dc14ed4cec04038cff5348d92f71b841c9dd337.zip
Merge pull request #991 from Vam-Jam/sort_down_fix
[fix] Sorting breaks subdir downloading
-rw-r--r--src/renderer.rs2
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}/")