about summary refs log tree commit
diff options
context:
space:
mode:
authorSteve Hay <steve.m.hay@googlemail.com>2017-11-14 13:29:15 +0000
committerGitHub <noreply@github.com>2017-11-14 13:29:15 +0000
commitbe8aa0ceaf09a19651150d0e517148f12e4d92d3 (patch)
treedd7cb7f5504a7d25d1071f62013601e1192fb1e9
parenteeacf2f9769c07b1529c071e45b2ccc8fb3b1cce (diff)
parenta20fef5d2eb411bf70ebe44f42417dfb7bd6fe3a (diff)
downloadperl-libnet-be8aa0ceaf09a19651150d0e517148f12e4d92d3.tar.gz
Merge pull request #32 from bk2204/mlsd-insensitive
Treat FTP MLSD commands case-insensitively
-rw-r--r--lib/Net/FTP.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Net/FTP.pm b/lib/Net/FTP.pm
index 6c27217..2d89684 100644
--- a/lib/Net/FTP.pm
+++ b/lib/Net/FTP.pm
@@ -668,7 +668,7 @@ sub rmdir {
 
   # Try to delete the contents
   # Get a list of all the files in the directory, excluding the current and parent directories
-  my @filelist = map { /^(?:\S+;)+ (.+)$/ ? ($1) : () } grep { !/^(?:\S+;)*type=[cp]dir;/ } $ftp->_list_cmd("MLSD", $dir);
+  my @filelist = map { /^(?:\S+;)+ (.+)$/ ? ($1) : () } grep { !/^(?:\S+;)*type=[cp]dir;/i } $ftp->_list_cmd("MLSD", $dir);
 
   # Fallback to using the less well-defined NLST command if MLSD fails
   @filelist = grep { !/^\.{1,2}$/ } $ftp->ls($dir)