summaryrefslogtreecommitdiff
path: root/desktop/source/deployment
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2012-11-17 21:17:07 +0000
committerMichael Meeks <michael.meeks@suse.com>2012-11-19 17:44:54 +0000
commit19e8dd66cb8a66536e19fc7780fbc1101be13710 (patch)
treee2743b6e7130ee7484ce3fd7d2e360fe0c874fbb /desktop/source/deployment
parent0d89cf29adf79fb0fc673b836ffd39ccf65b3383 (diff)
Revert "sb140: #i117084# do not leak Lockfile instance"
This reverts commit 1d38dbab29245e430792f7b3a4c14c94cd011504. Conflicts: desktop/source/app/app.cxx
Diffstat (limited to 'desktop/source/deployment')
-rw-r--r--desktop/source/deployment/inc/lockfile.hxx3
-rw-r--r--desktop/source/deployment/misc/lockfile.cxx9
2 files changed, 12 insertions, 0 deletions
diff --git a/desktop/source/deployment/inc/lockfile.hxx b/desktop/source/deployment/inc/lockfile.hxx
index 79b88960d623..391dd3dccaba 100644
--- a/desktop/source/deployment/inc/lockfile.hxx
+++ b/desktop/source/deployment/inc/lockfile.hxx
@@ -74,6 +74,9 @@ namespace desktop {
// found (iff gui) and returns false when we may not continue
sal_Bool check( fpExecWarning execWarning );
+ // removes the lockfile. should only be called in exceptional situations
+ void clean(void);
+
// removes the lockfile
~Lockfile(void);
diff --git a/desktop/source/deployment/misc/lockfile.cxx b/desktop/source/deployment/misc/lockfile.cxx
index fd9291fecc72..a06907731008 100644
--- a/desktop/source/deployment/misc/lockfile.cxx
+++ b/desktop/source/deployment/misc/lockfile.cxx
@@ -208,6 +208,15 @@ namespace desktop {
aConfig.Flush( );
}
+ void Lockfile::clean( void )
+ {
+ if ( m_bRemove )
+ {
+ File::remove( m_aLockname );
+ m_bRemove = sal_False;
+ }
+ }
+
Lockfile::~Lockfile( void )
{
// unlock userdata by removing file