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.
This commit is contained in:
Valentin Brandl 2019-04-30 16:45:29 +02:00
parent 1257db4e0d
commit 8fc46ab7cc
No known key found for this signature in database
GPG Key ID: 30D341DD34118D7D

View File

@ -204,7 +204,7 @@ fn hoc_request<T: Service>(
state: web::Data<Arc<State>>,
data: web::Path<(String, String)>,
) -> Result<HocResult, Error> {
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);