summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoachim Lingner <jl@openoffice.org>2010-07-28 12:19:34 +0200
committerJoachim Lingner <jl@openoffice.org>2010-07-28 12:19:34 +0200
commit528c08bd8d648cf1c2f9f4e38642146d3ee69dd0 (patch)
treefd5b39be99d39bcca58a1a6cdb9b56694d7bc3b3
parentf6a6db31e407119be5820361cc815f2cd380c6be (diff)
jl154 #i113463# processPackage_ in dp_configuration.cxx threw an IOException when revoking xcs files
-rw-r--r--desktop/source/deployment/registry/configuration/dp_configuration.cxx62
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 c50e6bdf42..a2f81e19ce 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());