summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2024-07-05 13:55:31 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2024-07-08 10:53:11 +0200
commit56a3bb29b1451233118204159b7861a23ace5d23 (patch)
treed6521ad6a5d2840fe7342467b6540e09aa999461 /package
parent74dbd40aa9f60197455f4dcef13c76826b934b93 (diff)
package: avoid throwing RuntimeException in getZipFileContents()
Translate it to ZipIOException. Change-Id: I7a07a59c0ba301b92f31696355c73ccbdf119ff8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170013 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit c409c83d777fdb6291c7cd03186b69fe4e7fd902) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170029 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'package')
-rw-r--r--package/source/zippackage/ZipPackage.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index 907ed1b4112e..2cb267734b9f 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -626,7 +626,11 @@ void ZipPackage::getZipFileContents()
if ( !pCurrent->hasByName( sTemp ) )
{
rtl::Reference<ZipPackageFolder> pPkgFolder = new ZipPackageFolder(m_xContext, m_nFormat, m_bAllowRemoveOnInsert);
- pPkgFolder->setName( sTemp );
+ try {
+ pPkgFolder->setName( sTemp );
+ } catch (uno::RuntimeException const& e) {
+ throw css::packages::zip::ZipIOException(e.Message);
+ }
pPkgFolder->doSetParent( pCurrent );
pCurrent = pPkgFolder.get();
}