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>
This commit is contained in:
Michael Stahl 2024-07-05 13:55:31 +02:00
parent 958cabd2e9
commit c409c83d77

View File

@ -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();
}