From 97f4c4b37a81c4a0c75516566800c2638e1862d6 Mon Sep 17 00:00:00 2001 From: CrispyPin Date: Fri, 19 Jul 2024 10:21:26 +0200 Subject: [PATCH] fix directory links not including a trailing slash for subdirs, leading to the parent dir link going too far back --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 19d1518..f0b5035 100644 --- a/src/main.rs +++ b/src/main.rs @@ -241,7 +241,7 @@ fn generate_index(relative_path: &str, path: &Path) -> Option { let trailing_slash = if size.is_some() { "" } else { "/" }; let filename = format!("{name}{trailing_slash}"); - let link = format!("{filename}"); + let link = format!("{filename}"); let size = size.map(format_size).unwrap_or_default() + "\n"; // NOTE: emojis in filenames will probably cause misalignment let width = filename.chars().count();