gestion des paths

This commit is contained in:
Hubert 2021-11-13 07:15:51 +01:00
parent ba19d67f66
commit 6beae6629f
1 changed files with 5 additions and 1 deletions

View File

@ -88,7 +88,11 @@ impl GitWebQ {
fn add_path(&self, name : &&String) -> GitWebQ {
match &self.path {
None => {self.clone_with_path(Some(name.to_string()))}
Some(path) => {self.clone_with_path()}
Some(path) => {if path.ends_with("/") {
self.clone_with_path(Some(path.clone() + name))
} else {
self.clone_with_path(Some(path.clone() + "/" + name))
}}
}
}
}