aboutsummaryrefslogtreecommitdiffstats
path: root/src/listing.rs
diff options
context:
space:
mode:
authorboastful-squirrel <boastful.squirrel@gmail.com>2019-04-16 18:21:44 +0000
committerboastful-squirrel <boastful.squirrel@gmail.com>2019-04-16 18:21:44 +0000
commit21da64bdf1b15fda276ab009137786e4a23e254a (patch)
tree58b7fea0f234cab50028481278c1768bc49df13c /src/listing.rs
parentOnly run tests on Linux (diff)
downloadminiserve-21da64bdf1b15fda276ab009137786e4a23e254a.tar.gz
miniserve-21da64bdf1b15fda276ab009137786e4a23e254a.zip
Fix issue 70
Diffstat (limited to '')
-rw-r--r--src/listing.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/listing.rs b/src/listing.rs
index 5008ed8..6aa1eac 100644
--- a/src/listing.rs
+++ b/src/listing.rs
@@ -132,8 +132,8 @@ pub fn directory_listing<S>(
default_color_scheme: themes::ColorScheme,
upload_route: String,
) -> Result<HttpResponse, io::Error> {
- let title = format!("Index of {}", req.path());
- let base = Path::new(req.path());
+ let serve_path = req.path();
+ 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 page_parent = base.parent().map(|p| p.display().to_string());
@@ -274,7 +274,7 @@ pub fn directory_listing<S>(
.content_type("text/html; charset=utf-8")
.body(
renderer::page(
- &title,
+ serve_path,
entries,
is_root,
page_parent,