1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-07-13 17:07:45 +00:00

Stop extracting game files if no unpack directory is set

This commit is contained in:
Joshua Goins 2025-07-12 08:26:13 -04:00
parent 87676bafd7
commit 48b84bfed9

View file

@ -449,6 +449,7 @@ impl SqPackResourceSpy {
impl Resource for SqPackResourceSpy {
fn read(&mut self, path: &str) -> Option<physis::ByteBuffer> {
if let Some(buffer) = self.sqpack_resource.read(path) {
if !self.output_directory.is_empty() {
let mut new_path = PathBuf::from(&self.output_directory);
new_path.push(path.to_lowercase());
@ -462,6 +463,7 @@ impl Resource for SqPackResourceSpy {
std::fs::write(new_path, &buffer).expect("Couldn't extract file!!");
}
}
return Some(buffer);
}