diff options
author | Armin Le Grand <Armin.Le.Grand@cib.de> | 2016-10-18 12:50:42 +0200 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@cib.de> | 2016-10-19 10:50:11 +0000 |
commit | 0f5d4da2b41fb30aea5465465052f4438ba3ba8c (patch) | |
tree | 2c4ffaf9302178c9333b23ee2a348e9edb8ddfff /desktop | |
parent | 17b94a616d63759294a9530dca5139972172aadf (diff) |
profilesafe: Deeper integration with SafeMode
Added deeper integration by saving at SaveMode content of user dir
completely to a user/SafeMode dir, including the whole stack
of pack files. Repair happens in that safe directory, so that
the user dir is resetted to default when re-started in SafeMode.
All changes (including complete deletion) are played back to
the user config at first restart with disabled SafeMode
Change-Id: I5114c7d5d04582be62090707bc9b97afa55fc1f1
Reviewed-on: https://gerrit.libreoffice.org/30003
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/app/app.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index eb48be03baaa..6b29f92fd4eb 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -556,6 +556,15 @@ void Desktop::Init() SetBootstrapError( BE_UNO_SERVICEMANAGER, e.Message ); } + // When we are in SafeMode we need to do changes before the configuration + // gets read (langselect::prepareLocale() by UNO API -> Components::Components) + const CommandLineArgs& rArgs = GetCommandLineArgs(); + const bool bSafeMode(rArgs.IsSafeMode() || sfx2::SafeMode::hasFlag()); + + // this may prepare SafeMode or restore from it by moving data in + // the UserConfiguration directory + comphelper::BackupFileHelper::reactOnSafeMode(bSafeMode); + if ( m_aBootstrapError == BE_OK ) { try |