about summary refs log tree commit
diff options
context:
space:
mode:
authorGraham Barr <gbarr@pobox.com>2000-03-29 12:48:09 +0000
committerGraham Barr <gbarr@pobox.com>2000-03-29 12:48:09 +0000
commitdc2621d769716867095f09d4b4dd90dc3b98b7b8 (patch)
tree7213c3141b674c2f4a560ef16afc404e98fd7002
parent61f23ae2e585a9246b7c649288d0a71f05d75a49 (diff)
downloadperl-libnet-dc2621d769716867095f09d4b4dd90dc3b98b7b8.tar.gz
Net::FTP
- update pattern to dig out unique filename from stou

-rw-r--r--Net/FTP.pm11
1 files changed, 7 insertions, 4 deletions
diff --git a/Net/FTP.pm b/Net/FTP.pm
index f2e26a4..381e1a7 100644
--- a/Net/FTP.pm
+++ b/Net/FTP.pm
@@ -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