about summary refs log tree commit
diff options
context:
space:
mode:
authorGraham Barr <gbarr@pobox.com>2002-09-23 14:01:24 +0000
committerGraham Barr <gbarr@pobox.com>2002-09-23 14:01:24 +0000
commitcba2da4a6694454d8e01d4108645f3129d93db0a (patch)
tree0c63b7049d0005cbee4a8f4da573fdf8e2151180
parentaba9853dbf7b3bac296c6966fe27428f04b52c43 (diff)
downloadperl-libnet-cba2da4a6694454d8e01d4108645f3129d93db0a.tar.gz
Net::FTP
- Fix unique name extraction to pick up name on initial
response, not just the final response

-rw-r--r--Net/FTP.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/Net/FTP.pm b/Net/FTP.pm
index 078aa9a..4e09b59 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.66"; # $Id: //depot/libnet/Net/FTP.pm#69 $
+$VERSION = "2.67"; # $Id: //depot/libnet/Net/FTP.pm#70 $
 @ISA     = qw(Exporter Net::Cmd IO::Socket::INET);
 
 # Someday I will "use constant", when I am not bothered to much about
@@ -717,6 +717,9 @@ sub _store_cmd
  $sock = $ftp->_data_cmd($cmd, $remote) or
         return undef;
 
+ $remote = ($ftp->message =~ /FILE:\s*(.*)/)[0]
+   if 'STOU' eq uc $cmd;
+
  my $blksize = ${*$ftp}{'net_ftp_blksize'};
 
  my($count,$hashh,$hashb,$ref) = (0);
@@ -1717,6 +1720,6 @@ under the same terms as Perl itself.
 
 =for html <hr>
 
-I<$Id: //depot/libnet/Net/FTP.pm#69 $>
+I<$Id: //depot/libnet/Net/FTP.pm#70 $>
 
 =cut