diff options
author | Martin Fischer <martin@push-f.com> | 2021-06-23 22:46:31 +0200 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2021-06-23 22:50:55 +0200 |
commit | 43b4b8693890a85f24eb358bc5545232ebf8e796 (patch) | |
tree | c83bbcacae18b034037399c197e1976346c40eb9 /src/get_routes.rs | |
parent | ca074febae4cd56ad5443c110a15662fa110dd81 (diff) |
make single-user mode operate on HEAD branch
Diffstat (limited to 'src/get_routes.rs')
-rw-r--r-- | src/get_routes.rs | 6 |
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(); |