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:
parent
87676bafd7
commit
48b84bfed9
1 changed files with 12 additions and 10 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue