diff options
-rw-r--r-- | qt-ui/subsurfacewebservices.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/qt-ui/subsurfacewebservices.cpp b/qt-ui/subsurfacewebservices.cpp index 5e2316d30..7c67ecc67 100644 --- a/qt-ui/subsurfacewebservices.cpp +++ b/qt-ui/subsurfacewebservices.cpp @@ -253,8 +253,16 @@ bool DivelogsDeWebServices::prepare_dives_for_divelogs(const QString &tempfile, qDebug() << errPrefix << "failed to include dive:" << i; } } - zip_close(zip); xsltFreeStylesheet(xslt); + if (zip_close(zip)) { + int ze, se; + zip_error_t *error = zip_get_error(zip); + ze = zip_error_code_zip(error); + se = zip_error_code_system(error); + report_error(qPrintable(tr("error writing zip file: %s zip error %d system error %d - %s")), + qPrintable(QDir::toNativeSeparators(tempfile)), ze, se, zip_strerror(zip)); + return false; + } return true; error_close_zip: |