fix
All checks were successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
JMARyA 2025-01-13 15:47:15 +01:00
parent cd0fe56c56
commit a56d990169
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263

View file

@ -30,12 +30,13 @@ impl MirrorRepository {
log::info!("Trying mirror {url}");
let client = reqwest::Client::new();
if let Ok(resp) = client.get(url).send().await {
if let Ok(resp) = client.get(&url).send().await {
if resp.status().is_success() {
let data = resp.bytes().await.unwrap().to_vec();
let parent = file_path.parent().unwrap();
std::fs::create_dir_all(parent).unwrap();
log::info!("Downloaded {url}");
std::fs::write(file_path, data).unwrap();
return;
} else {