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

SF.net SVN: ledger-smb:[4142] branches/1.3/LedgerSMB



Revision: 4142
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4142&view=rev
Author:   einhverfr
Date:     2011-12-04 23:33:20 +0000 (Sun, 04 Dec 2011)
Log Message:
-----------
Correcting lack of initialized logger in Tax.pm, 
Correcting win32 handling of mkdir in Sysconfig.pm

Modified Paths:
--------------
    branches/1.3/LedgerSMB/Sysconfig.pm
    branches/1.3/LedgerSMB/Tax.pm

Modified: branches/1.3/LedgerSMB/Sysconfig.pm
===================================================================
--- branches/1.3/LedgerSMB/Sysconfig.pm	2011-12-04 20:27:37 UTC (rev 4141)
+++ branches/1.3/LedgerSMB/Sysconfig.pm	2011-12-04 23:33:20 UTC (rev 4142)
@@ -202,11 +202,14 @@
 # Backup path
 our $backuppath = $tempdir;
 
-if(-d "$tempdir"){}
-else
-{
- my $rc=system("mkdir -p $tempdir");#TODO what if error?
- #$logger->info("created tempdir \$tempdir rc=\$rc"); log4perl not initialised yet!
+if(!(-d "$tempdir")){
+     my $rc;
+     if ($pathsep eq ';'){ # We need an actual platform configuration variable
+        $rc = system("mkdir $tempdir");
+     } else {
+         $rc=system("mkdir -p $tempdir");#TODO what if error?
+     #$logger->info("created tempdir \$tempdir rc=\$rc"); log4perl not initialised yet!
+     }
  print STDERR localtime()." Sysconfig.pm created tempdir $tempdir rc=$rc\n";
 }
 1;

Modified: branches/1.3/LedgerSMB/Tax.pm
===================================================================
--- branches/1.3/LedgerSMB/Tax.pm	2011-12-04 20:27:37 UTC (rev 4141)
+++ branches/1.3/LedgerSMB/Tax.pm	2011-12-04 23:33:20 UTC (rev 4142)
@@ -28,6 +28,7 @@
 package Tax;
 
 use Math::BigFloat;
+use Log::Log4perl;
 
 my $logger = Log::Log4perl->get_logger('Tax');
 

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