diff options
author | Graham Barr <gbarr@pobox.com> | 2000-03-29 12:48:09 +0000 |
---|---|---|
committer | Graham Barr <gbarr@pobox.com> | 2000-03-29 12:48:09 +0000 |
commit | dc2621d769716867095f09d4b4dd90dc3b98b7b8 (patch) | |
tree | 7213c3141b674c2f4a560ef16afc404e98fd7002 | |
parent | 61f23ae2e585a9246b7c649288d0a71f05d75a49 (diff) | |
download | perl-libnet-dc2621d769716867095f09d4b4dd90dc3b98b7b8.tar.gz |
Net::FTP
- update pattern to dig out unique filename from stou
-rw-r--r-- | Net/FTP.pm | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -1,4 +1,4 @@ -# Net::FTP.pm $Id: //depot/libnet/Net/FTP.pm#49 $ +# Net::FTP.pm $Id: //depot/libnet/Net/FTP.pm#50 $ # # Copyright (c) 1995-8 Graham Barr <gbarr@pobox.com>. All rights reserved. # This program is free software; you can redistribute it and/or @@ -726,8 +726,11 @@ sub _store_cmd $sock->close() or return undef; - ($remote) = $ftp->message =~ /unique file name:\s*(\S*)\s*\)/ - if ('STOU' eq uc $cmd); + if ('STOU' eq uc $cmd and $ftp->message =~ m/unique\ file\ name:(.*)\)|"(.*)"/) + { + require File::Basename; + $remote = File::Basename::basename($+) + } return $remote; } @@ -1653,6 +1656,6 @@ Copyright (c) 1995-1998 Graham Barr. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. -$Id: //depot/libnet/Net/FTP.pm#49 $ +$Id: //depot/libnet/Net/FTP.pm#50 $ =cut |