browse ok

This commit is contained in:
Hubert
2021-07-19 06:52:15 +02:00
parent 06fcc46a15
commit a562c4616c
3 changed files with 22 additions and 5 deletions

View File

@@ -153,8 +153,14 @@ async fn git_main(
gitust : web::Data<Gitust>
) -> Result<GitMainTemplate<Vec<Entry>, Vec<(String, String)>>, error::Error> {
let rootname = match pathopt {
None => {"/".to_string()}
Some(s) => {s}
None => {"".to_string()}
Some(s) => {
if s.starts_with("/") {
(&s[1..]).to_string()
} else {
s
}
}
};
let commit = match commitnameopt {
None => {match branchopt {