From 29a7374a7dd6ca5f4e8ae4256172edf0f9268111 Mon Sep 17 00:00:00 2001 From: Graham Barr Date: Sat, 18 Oct 2003 10:03:03 +0000 Subject: Net::FTP - Support some non-standard servers that place the word bytes in the response to SIZE --- Net/FTP.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Net/FTP.pm b/Net/FTP.pm index 5ec09b5..32471ea 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.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")) { -- cgit v1.2.3-24-ge0c7