Skip to content

Commit

Permalink
fix invalid compression method for locale patcher
Browse files Browse the repository at this point in the history
  • Loading branch information
ByteZ1337 committed Jun 15, 2024
1 parent ad1d5ec commit 8cb78ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/command/patch/locale_patcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ use std::path::PathBuf;

use anyhow::Context;
use binrw::io::BufReader;
use zip::{CompressionMethod, ZipArchive};
use zip::write::{ExtendedFileOptions, FileOptions};
use zip::ZipArchive;

pub fn patch_locale(patched: &PathBuf, game_dir: &PathBuf) -> anyhow::Result<()> {
let patched = patched.join("assets");
Expand All @@ -29,7 +29,7 @@ pub fn patch_locale(patched: &PathBuf, game_dir: &PathBuf) -> anyhow::Result<()>

if patch_file.exists() {
// General assets, just copy the patched file
writer.start_file::<&str, ExtendedFileOptions, &str>(name, FileOptions::default())
writer.start_file::<&str, ExtendedFileOptions, &str>(name, FileOptions::default().compression_method(CompressionMethod::Stored))
.context("Failed to start file")?;
let mut patch_file = BufReader::new(File::open(patch_file)
.context("Failed to open patch file")?
Expand Down

0 comments on commit 8cb78ff

Please sign in to comment.