From 8fc46ab7cc9b3a2a10c4964c5bcf2f5c3c3873a5 Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Tue, 30 Apr 2019 16:45:29 +0200 Subject: [PATCH] Use all lowercase path names for storage and caching `Microsoft/vscode` and `microsoft/vscode` point to the same directory but the repo would have been cloned twice. --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index ae6e74b..f2d38d2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -204,7 +204,7 @@ fn hoc_request( state: web::Data>, data: web::Path<(String, String)>, ) -> Result { - let repo = format!("{}/{}", data.0, data.1); + let repo = format!("{}/{}", data.0.to_lowercase(), data.1.to_lowercase()); let service_path = format!("{}/{}", T::domain(), repo); let path = format!("{}/{}", state.repos, service_path); let file = Path::new(&path);