mirror of
https://github.com/ouch-org/ouch.git
synced 2025-06-07 20:15:27 +00:00
fix: Incorrect decompressed file count
This commit is contained in:
parent
2ebdaf6ecf
commit
30d269fc8f
@ -165,7 +165,13 @@ pub fn decompress_file(
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
SevenZip => {
|
SevenZip => {
|
||||||
sevenz_rust::decompress_file(input_file_path, output_dir).map_err(|x| crate::Error::SevenzipError(x))?;
|
let mut count = 0;
|
||||||
|
sevenz_rust::decompress_file_with_extract_fn(input_file_path, output_dir,
|
||||||
|
|entry, reader, dest| {
|
||||||
|
count += 1;
|
||||||
|
sevenz_rust::default_entry_extract_fn(entry, reader, dest)
|
||||||
|
}
|
||||||
|
).map_err(|x| crate::Error::SevenzipError(x))?;
|
||||||
fs::read_dir(output_dir)?.count()
|
fs::read_dir(output_dir)?.count()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user