[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [288] trunk/LedgerSMB/User.pm



Revision: 288
          http://svn.sourceforge.net/ledger-smb/?rev=288&view=rev
Author:   tetragon
Date:     2006-10-24 07:47:05 -0700 (Tue, 24 Oct 2006)

Log Message:
-----------
Fix filenames used for memberfile locking

Modified Paths:
--------------
    trunk/LedgerSMB/User.pm

Modified: trunk/LedgerSMB/User.pm
===================================================================
--- trunk/LedgerSMB/User.pm	2006-10-24 04:38:49 UTC (rev 287)
+++ trunk/LedgerSMB/User.pm	2006-10-24 14:47:05 UTC (rev 288)
@@ -758,12 +758,14 @@
 	# 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 @@
 
 	print CONF "\n";
 	close CONF;
-	unlink "${memberfile}.LCK";
+	unlink "${LedgerSMB::Sysconfig::memberfile}.LCK";
 	# create conf file
 	if (! $self->{'root login'}) {
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.