mirror of
https://github.com/Ap0dexMe0/unixtract.git
synced 2026-07-16 05:04:22 +02:00
introduce concept of context in various format, to communicate information found in detection phase to extractor
- this does bring inconsistency to the detectors of formats, but I will work on fixing that. all detectors should be using Result<> anyway. - also add some static values to mtk_pkg , mtk_bdp - these improvements will be applied to other formats in future as well
This commit is contained in:
@@ -111,10 +111,10 @@ pub fn extract_sony_bdp(mut file: &File, output_folder: &str) -> Result<(), Box<
|
||||
if last_file_path.is_some() {
|
||||
println!("\nChecking if it's also MTK BDP...");
|
||||
let last_file = File::open(last_file_path.unwrap())?;
|
||||
if formats::mtk_bdp::is_mtk_bdp_file(&last_file) {
|
||||
if let Some(result) = formats::mtk_bdp::is_mtk_bdp_file(&last_file)? {
|
||||
println!("- MTK BDP file detected!\n");
|
||||
let mtk_extraction_path = format!("{}/{}", &output_folder, i - 1);
|
||||
formats::mtk_bdp::extract_mtk_bdp(&last_file, &mtk_extraction_path)?;
|
||||
formats::mtk_bdp::extract_mtk_bdp(&last_file, &mtk_extraction_path, result)?;
|
||||
} else {
|
||||
println!("- Not an MTK BDP file.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user