mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-30 03:15:38 -05:00
fix Zip::Impl::extractAt not making sure dest dir exists
This commit is contained in:
parent
cf14056037
commit
427e28c034
1 changed files with 6 additions and 3 deletions
|
@ -306,7 +306,8 @@ public:
|
|||
|
||||
mz_zip_entry_close(m_handle);
|
||||
|
||||
GEODE_UNWRAP(file::writeBinary(dir / name, res));
|
||||
GEODE_UNWRAP(file::createDirectoryAll(dir));
|
||||
GEODE_UNWRAP(file::writeBinary(dir / name, res).expect("Unable to write to {}: {error}", dir / name));
|
||||
|
||||
return Ok();
|
||||
}
|
||||
|
@ -336,10 +337,12 @@ public:
|
|||
#endif
|
||||
if (m_entries.at(filePath).isDirectory) {
|
||||
GEODE_UNWRAP(file::createDirectoryAll(dir / filePath));
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
GEODE_UNWRAP(this->extractAt(dir, filePath));
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
log::error(
|
||||
"Zip entry '{}' is not contained within zip bounds",
|
||||
dir / filePath
|
||||
|
|
Loading…
Reference in a new issue