diff options
Diffstat (limited to 'configmgr/source/components.cxx')
-rw-r--r-- | configmgr/source/components.cxx | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx index a193da06b167..206d3462a15e 100644 --- a/configmgr/source/components.cxx +++ b/configmgr/source/components.cxx @@ -643,18 +643,22 @@ Components::~Components() (*i)->setAlive(false); } - // test backup of registrymodifications - static bool bFeatureSecureUserConfig(true); - if (!bExitWasCalled && - bFeatureSecureUserConfig && ModificationTarget::File == modificationTarget_ && !modificationFileUrl_.isEmpty()) { - static sal_uInt16 nNumCopies(5); - comphelper::BackupFileHelper aBackupFileHelper(modificationFileUrl_, nNumCopies); + // test backup of registrymodifications + sal_uInt16 nSecureUserConfigNumCopies(0); + + // read configuration from soffice.ini + const bool bSecureUserConfig(comphelper::BackupFileHelper::getSecureUserConfig(nSecureUserConfigNumCopies)); - aBackupFileHelper.tryPush(); + if (bSecureUserConfig) + { + comphelper::BackupFileHelper aBackupFileHelper(modificationFileUrl_, nSecureUserConfigNumCopies); + + aBackupFileHelper.tryPush(); + } } } |