diff options
author | Sven-Hendrik Haase <svenstaro@gmail.com> | 2019-04-17 08:02:21 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-17 08:02:21 +0000 |
commit | 7ed64b5bf828b5982c53466f2335b52e366ab439 (patch) | |
tree | ec451abb0735f8d3b3d6a5ca8c09940ea41024e4 /src/listing.rs | |
parent | Merge pull request #72 from boastful-squirrel/word-wrap (diff) | |
parent | Fix issue 70 (diff) | |
download | miniserve-7ed64b5bf828b5982c53466f2335b52e366ab439.tar.gz miniserve-7ed64b5bf828b5982c53466f2335b52e366ab439.zip |
Merge pull request #71 from boastful-squirrel/fix70
Fix issue 70
Diffstat (limited to 'src/listing.rs')
-rw-r--r-- | src/listing.rs | 6 |
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, |