From b27d9387f7ebc7edf406035a8bbad1926f4510ea Mon Sep 17 00:00:00 2001 From: Pablu23 Date: Mon, 10 Jun 2024 18:14:50 +0200 Subject: [PATCH] Simple fix to decrypt windows files on Linux --- src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 0693217..1556a17 100644 --- a/src/main.rs +++ b/src/main.rs @@ -118,7 +118,10 @@ pub fn decrypt_file(source_path: &Path, pwd: &String, config: &Config) -> Result None => bail!("Root dir could not be extracted"), }?; - let file_name = String::from_utf8(file_name_buffer)?; + let mut file_name = String::from_utf8(file_name_buffer)?; + if cfg!(unix) { + file_name = file_name.replace("\\", "/"); + } let path = root_dir_path.join(&file_name); let prefix = path.parent().expect("No parent Directory");