unify error and success handling in extractors

This commit is contained in:
theubusu
2026-02-17 18:34:46 +01:00
parent aa2249f024
commit 10dd854685
29 changed files with 58 additions and 100 deletions
+1 -4
View File
@@ -39,8 +39,7 @@ pub fn extract_invincible_image(app_ctx: &AppContext, _ctx: Box<dyn Any>) -> Res
}
if header.file_version[0] != 3 {
println!("\nSorry, this version of the file is not supported!");
return Ok(())
return Err("Unsupported format version! (Only 3 is supported right now)".into());
}
let mut encrypted_data = Vec::new();
@@ -77,7 +76,5 @@ pub fn extract_invincible_image(app_ctx: &AppContext, _ctx: Box<dyn Any>) -> Res
i += 1;
}
println!("\nExtraction finished!");
Ok(())
}