jl154 #i113463# processPackage_ in dp_configuration.cxx threw an IOException when revoking xcs files
This commit is contained in:
@@ -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());
|
||||
|
||||
|
Reference in New Issue
Block a user