aboutsummaryrefslogtreecommitdiffstats
path: root/src/renderer.rs
diff options
context:
space:
mode:
authorJonas Diemer <jonasdiemer@gmail.com>2022-09-19 11:06:17 +0000
committerJonas Diemer <jonasdiemer@gmail.com>2022-09-19 11:06:17 +0000
commit6577af2b8d802ad213968e4b7c9f2823c1ab52dc (patch)
tree9550db92fafa937ad9699ee252b3eae3838f241b /src/renderer.rs
parentSwitched to using Path in test to handle windows platform. (diff)
downloadminiserve-6577af2b8d802ad213968e4b7c9f2823c1ab52dc.tar.gz
miniserve-6577af2b8d802ad213968e4b7c9f2823c1ab52dc.zip
Changed handling of allowed path to fix Windows
Diffstat (limited to '')
-rw-r--r--src/renderer.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/renderer.rs b/src/renderer.rs
index b98a595..38d2617 100644
--- a/src/renderer.rs
+++ b/src/renderer.rs
@@ -44,7 +44,7 @@ pub fn page(
|| conf
.allowed_upload_dir
.iter()
- .any(|x| encoded_dir.starts_with(&format!("/{}", x.display())));
+ .any(|x| encoded_dir.starts_with(&format!("/{}", x)));
html! {
(DOCTYPE)