modified: Cargo.lock

modified:   Cargo.toml
	modified:   src/lib.rs
This commit is contained in:
Michael Wain 2025-03-18 17:07:53 +03:00
parent e444cb55e9
commit 07756c75cd
3 changed files with 3 additions and 4 deletions

2
Cargo.lock generated
View File

@ -323,7 +323,7 @@ dependencies = [
[[package]] [[package]]
name = "nicotine" name = "nicotine"
version = "0.1.5" version = "0.1.6"
dependencies = [ dependencies = [
"walkdir", "walkdir",
"zip", "zip",

View File

@ -1,6 +1,6 @@
[package] [package]
name = "nicotine" name = "nicotine"
version = "0.1.5" version = "0.1.6"
edition = "2024" edition = "2024"
description = "A small rust crate for patching mojang's Authlib" description = "A small rust crate for patching mojang's Authlib"
authors = ["alterwain"] authors = ["alterwain"]

View File

@ -79,11 +79,10 @@ fn zip_dir<T: Write + Seek>(
let mut buffer = Vec::new(); let mut buffer = Vec::new();
for entry in walkdir::WalkDir::new(src_dir).min_depth(1) { for entry in walkdir::WalkDir::new(src_dir).same_file_system(true).min_depth(1) {
let entry = entry.unwrap(); let entry = entry.unwrap();
let path = entry.path(); let path = entry.path();
let name = path.strip_prefix(prefix).unwrap(); let name = path.strip_prefix(prefix).unwrap();
if path.is_file() { if path.is_file() {
let mut f = File::open(path)?; let mut f = File::open(path)?;
f.read_to_end(&mut buffer)?; f.read_to_end(&mut buffer)?;