Kaydet (Commit) c3beba87 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#706501 Uncaught exception

Change-Id: I435d189e6194d8d255ec88c4edad73d19a9bb5be
üst 6d28e240
...@@ -1188,20 +1188,34 @@ void BackendImpl::PackageImpl::exportTo( ...@@ -1188,20 +1188,34 @@ void BackendImpl::PackageImpl::exportTo(
} }
else else
{ {
// overwrite manifest.xml: bool bSuccess = false;
::ucbhelper::Content manifestContent; try
if ( ! create_ucb_content( {
&manifestContent, // overwrite manifest.xml:
makeURL( m_url_expanded, "META-INF/manifest.xml" ), ::ucbhelper::Content manifestContent;
xCmdEnv, false ) ) if ( ! create_ucb_content(
&manifestContent,
makeURL( m_url_expanded, "META-INF/manifest.xml" ),
xCmdEnv, false ) )
{
OSL_FAIL( "### missing META-INF/manifest.xml file!" );
return;
}
if (metainfFolderContent.transferContent(
manifestContent, ::ucbhelper::InsertOperation_COPY,
OUString(), ucb::NameClash::OVERWRITE ))
{
bSuccess = true;
}
}
catch (const css::ucb::ContentCreationException &e)
{ {
OSL_FAIL( "### missing META-INF/manifest.xml file!" ); SAL_WARN(
return; "desktop.deployment", "exception on overwriting manifest: " << e.Message);
} }
if (! metainfFolderContent.transferContent( if (!bSuccess)
manifestContent, ::ucbhelper::InsertOperation_COPY,
OUString(), ucb::NameClash::OVERWRITE ))
throw RuntimeException( "UCB transferContent() failed!", throw RuntimeException( "UCB transferContent() failed!",
static_cast<OWeakObject *>(this) ); static_cast<OWeakObject *>(this) );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment