From 6beae6629f3975ea7a940a64518bd1d017b46df2 Mon Sep 17 00:00:00 2001 From: Hubert Date: Sat, 13 Nov 2021 07:15:51 +0100 Subject: [PATCH] gestion des paths --- src/web/repo.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/web/repo.rs b/src/web/repo.rs index 9b45fb9..89efd42 100644 --- a/src/web/repo.rs +++ b/src/web/repo.rs @@ -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)) + }} } } }