1
0
mirror of https://github.com/pcvolkmer/osc-variant.git synced 2025-12-16 07:33:20 +00:00

refactor: remove password-less wrapper function for OSB files

This commit is contained in:
2025-01-01 18:50:47 +01:00
parent 8be859d274
commit f02a925e3f
2 changed files with 5 additions and 14 deletions

View File

@@ -45,7 +45,9 @@ macro_rules! error {
};
}
pub fn unzip_osb_using_password(path: &str, dir: &str, password: &str) {
pub fn unzip_osb(path: &str, dir: &str, password: Option<String>) {
let password = password.unwrap_or_else(|| deobfuscate(env!("OSB_KEY").trim()));
println!("Entpacke OSB-Datei {}\n", style(path).yellow());
let file = match fs::File::open(path) {
@@ -125,7 +127,3 @@ pub fn unzip_osb_using_password(path: &str, dir: &str, password: &str) {
}
}
}
pub fn unzip_osb(path: &str, dir: &str) {
unzip_osb_using_password(path, dir, deobfuscate(env!("OSB_KEY").trim()).as_str());
}