Fix paths
This commit is contained in:
parent
ec586ed7b5
commit
22a10de797
@ -125,10 +125,11 @@ fn github(
|
|||||||
state: web::Data<State>,
|
state: web::Data<State>,
|
||||||
data: web::Path<(String, String)>,
|
data: web::Path<(String, String)>,
|
||||||
) -> Result<HttpResponse, Error> {
|
) -> Result<HttpResponse, Error> {
|
||||||
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);
|
let file = Path::new(&path);
|
||||||
if !file.exists() {
|
if !file.exists() {
|
||||||
Repository::clone(&format!("https://{}", path), file)?;
|
Repository::clone(&format!("https://{}", gh_path), file)?;
|
||||||
}
|
}
|
||||||
pull(&path)?;
|
pull(&path)?;
|
||||||
let hoc = hoc(&path)?;
|
let hoc = hoc(&path)?;
|
||||||
|
Loading…
Reference in New Issue
Block a user