diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-12-12 17:29:28 +0100 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2017-01-19 18:12:58 +0100 |
commit | ee28048245699d87cdd58c84d2bb1a6bd4cda093 (patch) | |
tree | f4c2ec7ee7ba8e02c78c0a693920bb039ef2d00c /desktop | |
parent | 15fd33cd94442cc04306720297084d0b53a0d542 (diff) |
SafeMode: Restart goes into safe mode again
Looks like the XRestartManager keeps all command line arguments when
restarting, so it also keeps --safe-mode.
Solution is to add a flag file when restarting from safe mode,
to prevent going into safe mode again.
Change-Id: I9820d3ccbddf98b0bf6132f254c989f52ea5e808
Reviewed-on: https://gerrit.libreoffice.org/31913
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/app/app.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index c72b4853dc0a..1ae2a8a55ada 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -564,7 +564,10 @@ void Desktop::Init() // Check whether safe mode is enabled CommandLineArgs& rCmdLine = GetCommandLineArgs(); - if (rCmdLine.IsSafeMode() || sfx2::SafeMode::hasFlag()) + // Check if we are restarting from safe mode - in that case we don't want to enter it again + if (sfx2::SafeMode::hasRestartFlag()) + sfx2::SafeMode::removeRestartFlag(); + else if (rCmdLine.IsSafeMode() || sfx2::SafeMode::hasFlag()) Application::EnableSafeMode(); // When we are in SafeMode we need to do changes before the configuration |