mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-26 17:36:05 -05:00
fix Unzip::intoDir not deleting the zip after
This commit is contained in:
parent
037602ecea
commit
9da9493816
1 changed files with 6 additions and 2 deletions
|
@ -308,8 +308,12 @@ Result<> Unzip::intoDir(
|
|||
Path const& to,
|
||||
bool deleteZipAfter
|
||||
) {
|
||||
GEODE_UNWRAP_INTO(auto unzip, Unzip::create(from));
|
||||
GEODE_UNWRAP(unzip.extractAllTo(to));
|
||||
// scope to ensure the zip is closed after extracting so the zip can be
|
||||
// removed
|
||||
{
|
||||
GEODE_UNWRAP_INTO(auto unzip, Unzip::create(from));
|
||||
GEODE_UNWRAP(unzip.extractAllTo(to));
|
||||
}
|
||||
if (deleteZipAfter) {
|
||||
try { ghc::filesystem::remove(from); } catch(...) {}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue