fix(install): remove correct file on failed verification
This commit is contained in:
parent
03aadbe977
commit
1352c5f559
1 changed files with 1 additions and 1 deletions
|
|
@ -88,7 +88,7 @@ impl Install {
|
||||||
let verified = verify_sha512(&data, &file.hashes.sha512);
|
let verified = verify_sha512(&data, &file.hashes.sha512);
|
||||||
|
|
||||||
if !verified {
|
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());
|
return Err("sha1 verifaction failed for downloaded file".into());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue