aboutsummaryrefslogtreecommitdiff
path: root/src/get_routes.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/get_routes.rs')
-rw-r--r--src/get_routes.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/get_routes.rs b/src/get_routes.rs
index 433e676..01332e1 100644
--- a/src/get_routes.rs
+++ b/src/get_routes.rs
@@ -329,8 +329,10 @@ pub fn view_tree<C: Controller>(
};
page.body.push_str("<ul>");
- page.body
- .push_str("<li><a href='..' title='go to parent directory'>../</a></li>");
+ if ctx.parts.uri.path() != "/" {
+ page.body
+ .push_str("<li><a href='..' title='go to parent directory'>../</a></li>");
+ }
if let Ok(tree) = &tree {
let mut entries: Vec<_> = tree.iter().collect();