about summary refs log tree commit
diff options
context:
space:
mode:
-rw-r--r--Net/FTP/A.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/Net/FTP/A.pm b/Net/FTP/A.pm
index 44b9cdb..4daec36 100644
--- a/Net/FTP/A.pm
+++ b/Net/FTP/A.pm
@@ -10,7 +10,7 @@ use Carp;
 require Net::FTP::dataconn;
 
 @ISA = qw(Net::FTP::dataconn);
-$VERSION = "1.17";
+$VERSION = "1.18";
 
 sub read {
   my    $data          = shift;
@@ -72,7 +72,7 @@ sub write {
   my    $timeout = @_ ? shift : $data->timeout;
 
   my $nr = (my $tmp = substr($buf,0,$size)) =~ tr/\r\n/\015\012/;
-  $tmp =~ s/[^\015]\012/\015\012/sg if $nr;
+  $tmp =~ s/([^\015])\012/$1\015\012/sg if $nr;
   $tmp =~ s/^\012/\015\012/ unless ${*$data}{'net_ftp_outcr'};
   ${*$data}{'net_ftp_outcr'} = substr($tmp,-1) eq "\015";