mirror of
https://github.com/Ap0dexMe0/unixtract.git
synced 2026-07-16 13:14:22 +02:00
unify error and success handling in extractors
This commit is contained in:
@@ -62,11 +62,7 @@ pub fn extract_slp(app_ctx: &AppContext, _ctx: Box<dyn Any>) -> Result<(), Box<d
|
||||
let output_path = Path::new(&app_ctx.output_dir).join(format!("{}.bin", i));
|
||||
|
||||
fs::create_dir_all(&app_ctx.output_dir)?;
|
||||
let mut out_file = OpenOptions::new()
|
||||
.write(true)
|
||||
.create(true)
|
||||
.open(output_path)?;
|
||||
|
||||
let mut out_file = OpenOptions::new().write(true).create(true).open(output_path)?;
|
||||
out_file.write_all(&data)?;
|
||||
|
||||
println!("- Saved file!");
|
||||
@@ -74,7 +70,5 @@ pub fn extract_slp(app_ctx: &AppContext, _ctx: Box<dyn Any>) -> Result<(), Box<d
|
||||
i += 1;
|
||||
}
|
||||
|
||||
println!("\nExtraction finished!");
|
||||
|
||||
Ok(())
|
||||
}
|
||||
Reference in New Issue
Block a user