diff options
Diffstat (limited to 'src/listing.rs')
-rw-r--r-- | src/listing.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/listing.rs b/src/listing.rs index 42eb59a..d419775 100644 --- a/src/listing.rs +++ b/src/listing.rs @@ -152,7 +152,7 @@ pub fn directory_listing<S>( let base = Path::new(serve_path); let random_route = format!("/{}", random_route.unwrap_or_default()); - let is_root = base.parent().is_none() || req.path() == random_route; + let is_root = base.parent().is_none() || Path::new(&req.path()) == Path::new(&random_route); let current_dir = match base.strip_prefix(random_route) { Ok(c_d) => Path::new("/").join(c_d), Err(_) => base.to_path_buf(), |