diff options
author | Graham Barr <gbarr@pobox.com> | 2003-10-18 10:03:03 +0000 |
---|---|---|
committer | Graham Barr <gbarr@pobox.com> | 2003-10-18 10:03:03 +0000 |
commit | 29a7374a7dd6ca5f4e8ae4256172edf0f9268111 (patch) | |
tree | 5408544c0cbe7a899caea15d7734e503a6147984 | |
parent | d3cdbc7eabeebc190b163c8cca6f254815226c4c (diff) | |
download | perl-libnet-29a7374a7dd6ca5f4e8ae4256172edf0f9268111.tar.gz |
Net::FTP
- Support some non-standard servers that place the word bytes in the response to SIZE
-rw-r--r-- | Net/FTP.pm | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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.73"; # $Id: //depot/libnet/Net/FTP.pm#81 $ +$VERSION = "2.74"; # $Id: //depot/libnet/Net/FTP.pm#82 $ @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+)\s*$/)[0] + ? ($ftp->message =~ /(\d+)\s*(bytes?\s*)?$/)[0] : undef; } elsif($ftp->supported("STAT")) { |