mirror of
https://github.com/geode-sdk/geode.git
synced 2024-12-02 04:06:58 -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);
|
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();
|
return Ok();
|
||||||
}
|
}
|
||||||
|
@ -336,10 +337,12 @@ public:
|
||||||
#endif
|
#endif
|
||||||
if (m_entries.at(filePath).isDirectory) {
|
if (m_entries.at(filePath).isDirectory) {
|
||||||
GEODE_UNWRAP(file::createDirectoryAll(dir / filePath));
|
GEODE_UNWRAP(file::createDirectoryAll(dir / filePath));
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
GEODE_UNWRAP(this->extractAt(dir, filePath));
|
GEODE_UNWRAP(this->extractAt(dir, filePath));
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
log::error(
|
log::error(
|
||||||
"Zip entry '{}' is not contained within zip bounds",
|
"Zip entry '{}' is not contained within zip bounds",
|
||||||
dir / filePath
|
dir / filePath
|
||||||
|
|
Loading…
Reference in a new issue