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:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user