fix(install): remove correct file on failed verification

This commit is contained in:
RafayAhmad7548 2026-09-03 13:12:09 +05:00
parent 03aadbe977
commit 1352c5f559
Signed by: RafayAhmad
SSH key fingerprint: SHA256:WURX8viobA1uawb4dWM3LqYrY+XPcZcXhAXAlrYdhtE

View file

@ -88,7 +88,7 @@ impl Install {
let verified = verify_sha512(&data, &file.hashes.sha512);
if !verified {
tokio::fs::remove_file("server.jar").await?;
tokio::fs::remove_file(&file.filename).await?;
return Err("sha1 verifaction failed for downloaded file".into());
}