mirror of
https://github.com/pcvolkmer/osc-variant.git
synced 2025-07-03 01:02:55 +00:00
chore: use zip crate version 1.1
This commit is contained in:
@ -62,7 +62,7 @@ pub fn check_file(file: &Path, password: &str) -> Result<Vec<CheckNotice>, Check
|
||||
|
||||
for i in 0..archive.len() {
|
||||
progress_bar.inc(1);
|
||||
if let Ok(Ok(mut zip_file)) = archive.by_index_decrypt(i, password.as_bytes()) {
|
||||
if let Ok(mut zip_file) = archive.by_index_decrypt(i, password.as_bytes()) {
|
||||
progress_bar.set_message(zip_file.name().to_string());
|
||||
if zip_file.is_file() && zip_file.name().ends_with(".osc") {
|
||||
let mut buf = String::new();
|
||||
|
@ -123,9 +123,7 @@ impl InputFile {
|
||||
let password = _password.unwrap_or_else(|| deobfuscate(env!("OSB_KEY").trim()));
|
||||
|
||||
for i in 0..archive.len() {
|
||||
if let Ok(Ok(mut zip_file)) =
|
||||
archive.by_index_decrypt(i, password.as_bytes())
|
||||
{
|
||||
if let Ok(mut zip_file) = archive.by_index_decrypt(i, password.as_bytes()) {
|
||||
if zip_file.is_file() && zip_file.name().ends_with(".osc") {
|
||||
let mut buf = String::new();
|
||||
let _ = zip_file.read_to_string(&mut buf);
|
||||
|
@ -77,7 +77,7 @@ pub fn unzip_osb_using_password(path: &str, dir: &str, password: &str) {
|
||||
};
|
||||
|
||||
for i in 0..archive.len() {
|
||||
let mut file = if let Ok(Ok(file)) = archive.by_index_decrypt(i, password.as_bytes()) {
|
||||
let mut file = if let Ok(file) = archive.by_index_decrypt(i, password.as_bytes()) {
|
||||
file
|
||||
} else {
|
||||
println!(
|
||||
|
Reference in New Issue
Block a user