-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
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
fix: unlink zip file in case of exceptions #492
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #492 +/- ##
=============================================
+ Coverage 37.47% 37.64% +0.17%
- Complexity 795 797 +2
=============================================
Files 96 96
Lines 2874 2882 +8
=============================================
+ Hits 1077 1085 +8
Misses 1797 1797
☔ View full report in Codecov by Sentry. |
model/ZipExporter.php
Outdated
$baseDir = tao_helpers_Export::getExportPath(); | ||
$path = $baseDir . '/' . $filename . '.zip'; | ||
|
||
$zip = new ZipArchive(); | ||
if ($zip->open($path, ZipArchive::CREATE) !== true) { | ||
throw new common_Exception('Unable to create zipfile ' . $path); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible that your issue also happen here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- New code is covered by tests (if applicable)
- Tests are running successfully (old and new ones) on my local machine (if applicable)
- New code is respecting code style rules
- New code is respecting best practices
- New code is not subject to concurrency issues (if applicable)
- [] Feature is working correctly on my local machine (if applicable)
- Acceptance criteria are respected
- Pull request title and description are meaningful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your tao-core PR seems to be a dependency for this fix.
So if it is, please, do not forget to update composer requirements in this repo according tao-core version supposed to be released.
Thank you for the notice, I updated component dependencies in composer.json. |
Version
There are 0 BREAKING CHANGE, 3 features, 5 fixes |
Ticket: https://oat-sa.atlassian.net/browse/ADF-961
What's Changed
TODO
How to test