[freeside-commits] freeside/FS/FS/Cron upload.pm,1.1.6.2,1.1.6.3

Ivan,,, ivan at wavetail.420.am
Tue May 10 12:42:11 PDT 2011


Update of /home/cvs/cvsroot/freeside/FS/FS/Cron
In directory wavetail.420.am:/tmp/cvs-serv11028

Modified Files:
      Tag: FREESIDE_2_1_BRANCH
	upload.pm 
Log Message:
FTP error on "cd /" not fatal, RT#12326

Index: upload.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Cron/upload.pm,v
retrieving revision 1.1.6.2
retrieving revision 1.1.6.3
diff -u -w -d -r1.1.6.2 -r1.1.6.3
--- upload.pm	22 Apr 2011 23:36:26 -0000	1.1.6.2
+++ upload.pm	10 May 2011 19:42:09 -0000	1.1.6.3
@@ -179,8 +179,10 @@
       or die "can't connect to $hostname: $@\n";
     $ftp->login($username, $password)
       or die "can't login to $hostname: ". $ftp->message."\n";
-    $ftp->cwd($path)
-      or die "can't cd $path on $hostname: ". $ftp->message. "\n";
+    unless ( $ftp->cwd($path) ) {
+      my $msg = "can't cd $path on $hostname: ". $ftp->message. "\n";
+      ( $path eq '/' ) ? warn $msg : die $msg;
+    }
     $ftp->binary
       or die "can't set binary mode on $hostname\n";
 



More information about the freeside-commits mailing list