diff options
author | Joachim Lingner <jl@openoffice.org> | 2010-07-28 12:19:34 +0200 |
---|---|---|
committer | Joachim Lingner <jl@openoffice.org> | 2010-07-28 12:19:34 +0200 |
commit | ac751d3424a43ef3729a14036473bfda71280ef9 (patch) | |
tree | 0b028bcb08ae083d803467f3559f58d52ef0365c /desktop/source | |
parent | 25291f60b2d3626cbf289233af1a9f796bcf227b (diff) |
jl154 #i113463# processPackage_ in dp_configuration.cxx threw an IOException when revoking xcs files
Diffstat (limited to 'desktop/source')
-rw-r--r-- | desktop/source/deployment/registry/configuration/dp_configuration.cxx | 62 |
1 files changed, 25 insertions, 37 deletions
diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx index 9ea6e8227340..3c6680065db5 100644 --- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx +++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx @@ -359,16 +359,11 @@ void BackendImpl::configmgrini_verify_init( do { OUString token( line.getToken( 0, ' ', index ).trim() ); if (token.getLength() > 0) { - // cleanup, check if existing: - if (create_ucb_content( - 0, expandUnoRcTerm(token), xCmdEnv, - false /* no throw */ )) { - //The file may not exist anymore if a shared or bundled - //extension was removed, but it can still be in the configmgrini. - //After running XExtensionManager::synchronize, the configmgrini is - //cleaned up - m_xcs_files.push_back( token ); - } + //The file may not exist anymore if a shared or bundled + //extension was removed, but it can still be in the configmgrini. + //After running XExtensionManager::synchronize, the configmgrini is + //cleaned up + m_xcs_files.push_back( token ); } } while (index >= 0); @@ -378,31 +373,15 @@ void BackendImpl::configmgrini_verify_init( sal_Int32 index = sizeof ("DATA=") - 1; do { OUString token( line.getToken( 0, ' ', index ).trim() ); - if (token.getLength() > 0) { + if (token.getLength() > 0) + { if (token[ 0 ] == '?') token = token.copy( 1 ); - // cleanup, check if existing: - if (create_ucb_content( - 0, expandUnoRcTerm(token), - xCmdEnv, false /* no throw */ )) { - //The file may not exist anymore if a shared or bundled - //extension was removed, but it can still be in the configmgrini. - //After running XExtensionManager::synchronize, the configmgrini is - //cleaned up - m_xcu_files.push_back( token ); - } - else - { - //Check if it was removed. Only when the file contained %origin, so that - //a new file was writen in the user installation (e.g. $BUNDLED_EXTENSIONS_USER) - //See also ConfigurationBackendDb.iniEntry - ::std::list<OUString> iniEntries = getAllIniEntries(); - if (::std::find(iniEntries.begin(), iniEntries.end(), token) - != iniEntries.end()) - m_xcu_files.push_back( token ); - else - OSL_ENSURE(0, "Extension manager: Invalid configmgr.ini entry."); - } + //The file may not exist anymore if a shared or bundled + //extension was removed, but it can still be in the configmgrini. + //After running XExtensionManager::synchronize, the configmgrini is + //cleaned up + m_xcu_files.push_back( token ); } } while (index >= 0); @@ -502,6 +481,8 @@ bool BackendImpl::removeFromConfigmgrIni( { //in case the xcu contained %origin% then the configmr.ini contains the //url to the file in the user installation (e.g. $BUNDLED_EXTENSIONS_USER) + //However, m_url (getURL()) contains the URL for the file in the actual + //extension installatation. ::boost::optional<ConfigurationBackendDb::Data> data = readDataFromDb(url_); if (data) i = std::find(rSet.begin(), rSet.end(), data->iniEntry); @@ -757,10 +738,17 @@ void BackendImpl::PackageImpl::processPackage_( } that->m_registeredPackages->erase(i->first); } - ::ucbhelper::Content( - makeURL( that->getCachePath(), OUSTR("registry") ), - xCmdEnv ).executeCommand( - OUSTR("delete"), Any( true /* delete physically */ ) ); + try + { + ::ucbhelper::Content( + makeURL( that->getCachePath(), OUSTR("registry") ), + xCmdEnv ).executeCommand( + OUSTR("delete"), Any( true /* delete physically */ ) ); + } + catch(Exception&) + { + OSL_ASSERT(0); + } } that->deleteDataFromDb(getURL()); |