diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-09-05 15:53:29 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-09-05 15:53:29 +0100 |
commit | 962f01c3750be3b4309232789708cb7982ced591 (patch) | |
tree | c84d32d9ca8e321fa9404a9794f0d28d4b153abf /desktop | |
parent | b1a5a7e2be619be2d52094eff6802f0ef5470ca4 (diff) |
coverity#983652 Uncaught exception
Change-Id: I72f298c5cd0476d6e0cbf3ffaf5fdf5cd143a21c
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/deployment/manager/dp_manager.cxx | 14 | ||||
-rw-r--r-- | desktop/source/deployment/registry/dp_backend.cxx | 2 | ||||
-rw-r--r-- | desktop/source/deployment/registry/dp_registry.cxx | 2 |
3 files changed, 14 insertions, 4 deletions
diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx index ebd369344a17..ee8f84b88138 100644 --- a/desktop/source/deployment/manager/dp_manager.cxx +++ b/desktop/source/deployment/manager/dp_manager.cxx @@ -1296,8 +1296,18 @@ bool PackageManagerImpl::synchronizeAddedExtensions( ActivePackages::Entries id2temp( m_activePackagesDB->getEntries() ); //check if the folder exist at all. The shared extension folder //may not exist for a normal user. - if (!create_ucb_content( - NULL, m_activePackages_expanded, Reference<css::ucb::XCommandEnvironment>(), false)) + bool bOk=true; + try + { + bOk = create_ucb_content( + NULL, m_activePackages_expanded, Reference<css::ucb::XCommandEnvironment>(), false); + } + catch (const css::ucb::ContentCreationException&) + { + bOk = false; + } + + if (!bOk) return bModified; ::ucbhelper::Content tempFolder( m_activePackages_expanded, xCmdEnv, m_xComponentContext ); diff --git a/desktop/source/deployment/registry/dp_backend.cxx b/desktop/source/deployment/registry/dp_backend.cxx index d31163045648..d1cd8df497c7 100644 --- a/desktop/source/deployment/registry/dp_backend.cxx +++ b/desktop/source/deployment/registry/dp_backend.cxx @@ -574,7 +574,7 @@ void Package::exportTo( ::ucbhelper::Content destFolder( destFolderURL, xCmdEnv, getMyBackend()->getComponentContext() ); ::ucbhelper::Content sourceContent( getURL(), xCmdEnv, getMyBackend()->getComponentContext() ); - bool bOk; + bool bOk=true; try { bOk = destFolder.transferContent( diff --git a/desktop/source/deployment/registry/dp_registry.cxx b/desktop/source/deployment/registry/dp_registry.cxx index 5131afb5dcd8..a5d364da63e1 100644 --- a/desktop/source/deployment/registry/dp_registry.cxx +++ b/desktop/source/deployment/registry/dp_registry.cxx @@ -464,7 +464,7 @@ Reference<deployment::XPackage> PackageRegistryImpl::bindPackage( if (mediaType.isEmpty()) { ::ucbhelper::Content ucbContent; - bool bOk; + bool bOk=true; try { |