From 3355dc9e9aac228e1260538f872fb03fb13a0036 Mon Sep 17 00:00:00 2001 From: Matteo Settenvini Date: Mon, 11 Aug 2025 10:25:21 +0200 Subject: [PATCH] fix: ensure dirs are presented with trailing slash Prevent invalid links always starting from the webserver root. --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 9a747fc..201b1ce 100644 --- a/src/main.rs +++ b/src/main.rs @@ -172,7 +172,7 @@ async fn file_view( let folders = s3_objects.common_prefixes.into_iter().map(|dir| { let dirname = dir.parts().last().unwrap(); FileViewItem { - path: dirname.as_ref().into(), + path: format!("{}/", dirname.as_ref().to_string()), size_bytes: 0, size: "[DIR]".to_owned(), last_modification: String::default(),