mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
Report error received from zip_close
We may want to hide the error text in a release build and replace it with something more user friendly but then again, the next time this fails on us at least our users can report more than "doesn't work"... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
3b033a85ac
commit
8c706357f4
1 changed files with 9 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue