Kaydet (Commit) fbe9accf authored tarafından Miklos Vajna's avatar Miklos Vajna Kaydeden (comit) Michael Stahl

desktop: avoid loading to-be-recovered documents when recovery is disabled

Change-Id: I5c8a117df53e0c7efd1e82ec6e56080c8fd42345
Reviewed-on: https://gerrit.libreoffice.org/13438Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
Tested-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst 19762e8b
...@@ -2312,6 +2312,9 @@ void Desktop::OpenClients() ...@@ -2312,6 +2312,9 @@ void Desktop::OpenClients()
SAL_WARN( "desktop.app", "Error during recovery" << e.Message); SAL_WARN( "desktop.app", "Error during recovery" << e.Message);
} }
} }
else if (bExistsRecoveryData && bDisableRecovery)
// prevent new Writer doc
bRecovery = true;
Reference< XSessionManagerListener2 > xSessionListener; Reference< XSessionManagerListener2 > xSessionListener;
try try
...@@ -2325,8 +2328,7 @@ void Desktop::OpenClients() ...@@ -2325,8 +2328,7 @@ void Desktop::OpenClients()
SAL_WARN( "desktop.app", "Registration of session listener failed" << e.Message); SAL_WARN( "desktop.app", "Registration of session listener failed" << e.Message);
} }
// in bDisableRecovery case call doRestore() to prevent new Writer doc if ( !bExistsRecoveryData && xSessionListener.is() )
if ((!bExistsRecoveryData || bDisableRecovery) && xSessionListener.is())
{ {
// session management // session management
try try
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment