We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It doesn't appear to overwrite existing files when extracting, nor have an option to. Would be a nice added feature to have.
Cheers
The text was updated successfully, but these errors were encountered:
I had the same problem. It seems overwriting isn't working properly using ZipArchive::extractTo.
Instead, you can use PharData::extractTo, where you can explicitly enable overwriting.
public static function extractZipArchive($archive, $destination) { try { $phar = new PharData($archive); if ($phar->extractTo($destination, null, true)) { $GLOBALS['status'] = array('success' => 'Extracted archive successfully.'); } else { $GLOBALS['status'] = array('error' => 'Error while extracting.'); } } catch (Exception $e) { $GLOBALS['status'] = array('error' => $e->getMessage()); } }
Sorry, something went wrong.
No branches or pull requests
It doesn't appear to overwrite existing files when extracting, nor have an option to. Would be a nice added feature to have.
Cheers
The text was updated successfully, but these errors were encountered: