diff options
author | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-10-24 14:47:05 +0000 |
---|---|---|
committer | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-10-24 14:47:05 +0000 |
commit | 259721aa1e8f94c26e372726f54f2dab785755bc (patch) | |
tree | fde8a89781b1bf5dc78fd48ac3d2b8fe7d72504c /LedgerSMB | |
parent | 7307ea779b338aba98accfc7ff5ac447842ad76b (diff) |
Fix filenames used for memberfile locking
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@288 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB')
-rwxr-xr-x | LedgerSMB/User.pm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/LedgerSMB/User.pm b/LedgerSMB/User.pm index 09b4a533..0b769a46 100755 --- a/LedgerSMB/User.pm +++ b/LedgerSMB/User.pm @@ -758,12 +758,14 @@ sub save_member { # format dbconnect and dboptions string &dbconnect_vars($self, $self->{dbname}); - $self->error("${LedgerSMB::Sysconfig::memberfile} locked!") if (-f "${memberfile}.LCK"); - open(FH, ">${memberfile}.LCK") or $self->error("${memberfile}.LCK : $!"); + $self->error("${LedgerSMB::Sysconfig::memberfile} locked!") + if (-f "${LedgerSMB::Sysconfig::memberfile}.LCK"); + open(FH, ">${LedgerSMB::Sysconfig::memberfile}.LCK") + or $self->error("${LedgerSMB::Sysconfig::memberfile}.LCK : $!"); close(FH); if (! open(CONF, "+<${LedgerSMB::Sysconfig::memberfile}")) { - unlink "${memberfile}.LCK"; + unlink "${LedgerSMB::Sysconfig::memberfile}.LCK"; $self->error("${LedgerSMB::Sysconfig::memberfile} : $!"); } @@ -816,7 +818,7 @@ sub save_member { print CONF "\n"; close CONF; - unlink "${memberfile}.LCK"; + unlink "${LedgerSMB::Sysconfig::memberfile}.LCK"; # create conf file if (! $self->{'root login'}) { |