From c55143440ed00262d3dc2143cca85286dd3b6565 Mon Sep 17 00:00:00 2001 From: alterwain Date: Tue, 18 Mar 2025 18:12:53 +0300 Subject: [PATCH] modified: Cargo.lock modified: Cargo.toml modified: src/lib.rs --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/lib.rs | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 75fd2ac..2c3d3e1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -353,7 +353,7 @@ dependencies = [ [[package]] name = "nicotine" -version = "0.1.15" +version = "0.1.16" dependencies = [ "zip-extract", ] diff --git a/Cargo.toml b/Cargo.toml index f235998..263b097 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nicotine" -version = "0.1.15" +version = "0.1.16" edition = "2024" description = "A small rust crate for patching mojang's Authlib" authors = ["alterwain"] diff --git a/src/lib.rs b/src/lib.rs index a94ae73..0c639c0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -76,12 +76,14 @@ fn zip_dir( src_dir: &Path, writer: &str, ) -> Result<(), Box> { - let mut a = Command::new("tmp/7za.exe") + let mut a = Command::new(std::fs::canonicalize(PathBuf::from("./tmp/7za.exe")).unwrap()) + .current_dir(src_dir) .arg("a") .arg("-tzip") .arg("-mx=0") .arg(writer) - .arg([src_dir.to_str().unwrap(), "\\", "*"].concat()) + .arg("*") + .arg("-r") .spawn()?; a.wait()?; Ok(())