diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2017-07-17 22:43:12 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2017-07-28 13:49:51 +0200 |
commit | f9393801b72751c0f1822498520270adcabfba37 (patch) | |
tree | af475c024c7eaaccc7f35ab6eaf467a782bddcb0 /desktop | |
parent | d045fd7b5d5bbd7e2569ba1571229f4f1fc3559a (diff) |
Added SAL_NOLOCK_PROFILE variable to ignore lockfile
Change-Id: I4fb250468fc17fc8be94d666ef231636b4609c1d
Reviewed-on: https://gerrit.libreoffice.org/40100
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/app/app.cxx | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 819bcde64954..7c70eca66101 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -1448,16 +1448,18 @@ int Desktop::Main() // check user installation directory for lockfile so we can be sure // there is no other instance using our data files from a remote host - /* tdf#109085 temporary don't show warning about another instance running - m_xLockfile.reset(new Lockfile); - - if ( !rCmdLineArgs.IsHeadless() && !rCmdLineArgs.IsInvisible() && - !rCmdLineArgs.IsNoLockcheck() && !m_xLockfile->check( Lockfile_execWarning )) + bool bMustLockProfile = ( getenv( "SAL_NOLOCK_PROFILE" ) == nullptr ); + if ( bMustLockProfile ) { - // Lockfile exists, and user clicked 'no' - return EXIT_FAILURE; + m_xLockfile.reset(new Lockfile); + + if ( !rCmdLineArgs.IsHeadless() && !rCmdLineArgs.IsInvisible() && + !rCmdLineArgs.IsNoLockcheck() && !m_xLockfile->check( Lockfile_execWarning )) + { + // Lockfile exists, and user clicked 'no' + return EXIT_FAILURE; + } } - */ // check if accessibility is enabled but not working and allow to quit if( Application::GetSettings().GetMiscSettings().GetEnableATToolSupport() ) |