about summary refs log tree commit
diff options
context:
space:
mode:
authorGraham Barr <gbarr@pobox.com>2003-09-25 09:22:26 +0000
committerGraham Barr <gbarr@pobox.com>2003-09-25 09:22:26 +0000
commit3a232eab88d61a03e37a92da96213fb763589b0c (patch)
tree9e48ba8293d683ac29bcd1cc2e213e5b71d42dc2
parentce09c12b3449b9120c3ff5c71f54447eeb1be0a4 (diff)
downloadperl-libnet-3a232eab88d61a03e37a92da96213fb763589b0c.tar.gz
Net::FTP
- Allow spaces after the file size in the response to SIZE

-rw-r--r--Net/FTP.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/Net/FTP.pm b/Net/FTP.pm
index aac963b..463c603 100644
--- a/Net/FTP.pm
+++ b/Net/FTP.pm
@@ -22,7 +22,7 @@ use Net::Config;
 use Fcntl qw(O_WRONLY O_RDONLY O_APPEND O_CREAT O_TRUNC);
 # use AutoLoader qw(AUTOLOAD);
 
-$VERSION = "2.71"; # $Id: //depot/libnet/Net/FTP.pm#78 $
+$VERSION = "2.72"; # $Id: //depot/libnet/Net/FTP.pm#79 $
 @ISA     = qw(Exporter Net::Cmd IO::Socket::INET);
 
 # Someday I will "use constant", when I am not bothered to much about
@@ -206,7 +206,7 @@ sub size {
   my $io;
   if($ftp->supported("SIZE")) {
     return $ftp->_SIZE($file)
-        ? ($ftp->message =~ /(\d+)$/)[0]
+        ? ($ftp->message =~ /(\d+)\s*$/)[0]
         : undef;
  }
  elsif($ftp->supported("STAT")) {
@@ -1767,6 +1767,6 @@ under the same terms as Perl itself.
 
 =for html <hr>
 
-I<$Id: //depot/libnet/Net/FTP.pm#78 $>
+I<$Id: //depot/libnet/Net/FTP.pm#79 $>
 
 =cut