modrinth mod dl and update version num (oops)

This commit is contained in:
2026-07-29 15:29:21 -04:00
parent 4f802ca298
commit bdb7386480
8 changed files with 84 additions and 11 deletions

View File

@@ -10,7 +10,9 @@ pub fn download(url: &str, path: &Path) -> anyhow::Result<()> {
if let Some(parent) = path.parent() {
create_dir_all(parent)?;
}
let mut res = get(url).call()?;
let mut res = get(url)
.header("User-Agent", crate::util::USER_AGENT)
.call()?;
let mut file = File::create(path)?;
copy(&mut res.body_mut().as_reader(), &mut file)?;
Ok(())