Skip to content

Commit

Permalink
⬇️ Downgrade zip crate to 1.1.3 (#435)
Browse files Browse the repository at this point in the history
* ⬇️ Downgrade `zip` crate to `1.1.3`

Relates to #427

* fix test
  • Loading branch information
aaronleopold authored Sep 6, 2024
1 parent ceb2aa1 commit fe35819
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 176 deletions.
179 changes: 6 additions & 173 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ uuid = "1.10.0"
walkdir = "2.5.0"
webp = "0.3.0"
xml-rs = "0.8.21" # XML reader/writer
zip = "2.2.0"
# Note: We need to keep this downgraded for the time being. See https://github.com/stumpapp/stump/issues/427#issuecomment-2332857700
zip = { version = "=1.1.3", features = ["deflate"], default-features = false }

[dev-dependencies]
temp-env = "0.3.6"
Expand Down
4 changes: 2 additions & 2 deletions core/src/filesystem/archive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub(crate) fn zip_dir(

let mut zip_writer = zip::ZipWriter::new(zip_file);

let options: FileOptions<'_, ()> = FileOptions::default()
let options: FileOptions<()> = FileOptions::default()
.compression_method(CompressionMethod::Stored)
.unix_permissions(0o755);

Expand Down Expand Up @@ -110,7 +110,7 @@ mod tests {
assert_eq!(zip_archive.len(), 1);

let mut file = zip_archive.by_index(0).unwrap();
assert_eq!(file.name(), "file.txt");
assert_eq!(file.name(), "/file.txt");

let mut contents = String::new();
file.read_to_string(&mut contents).unwrap();
Expand Down

0 comments on commit fe35819

Please sign in to comment.