From 22a10de7979ccfe37efb65520eabfb3e8eace5b4 Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Tue, 16 Apr 2019 17:33:27 +0200 Subject: [PATCH] Fix paths --- src/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index a2cbe39..f059c76 100644 --- a/src/main.rs +++ b/src/main.rs @@ -125,10 +125,11 @@ fn github( state: web::Data, data: web::Path<(String, String)>, ) -> Result { - let path = format!("{}/github.com/{}/{}", *state, data.0, data.1); + let gh_path = format!("github.com/{}/{}", data.0, data.1); + let path = format!("{}/{}", *state, gh_path); let file = Path::new(&path); if !file.exists() { - Repository::clone(&format!("https://{}", path), file)?; + Repository::clone(&format!("https://{}", gh_path), file)?; } pull(&path)?; let hoc = hoc(&path)?;