diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2017-07-17 22:43:12 +0200 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2017-07-28 15:28:39 +0200 |
commit | 13e57e42a662df76974744e916716c9f4dc9ce60 (patch) | |
tree | 5ca240a3cb758f2523c93fce66d4a2ffe4590216 | |
parent | 294967eb16a54225344ecb1913bdf85a0dc24585 (diff) |
Added SAL_NOLOCK_PROFILE variable to ignore lockfile
Change-Id: I4fb250468fc17fc8be94d666ef231636b4609c1d
Reviewed-on: https://gerrit.libreoffice.org/40520
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
-rw-r--r-- | desktop/source/app/app.cxx | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 4e6dc432f55e..e337130f66c3 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -1352,13 +1352,18 @@ int Desktop::Main() #if HAVE_FEATURE_DESKTOP // check user installation directory for lockfile so we can be sure // there is no other instance using our data files from a remote host - 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 |