Subject: | recursive directory removal fails on some stupid ftp servers |
this is just a one-liner to fix the stupid behavior of some
windows ftp servers which return upper directory pointer (..)
in the file listing. the bug is pretty annoying if you try to
recursively delete a directory on such a server. the patch
is against 1.17.
--- FTP.pm.orig Tue Jan 27 14:41:17 2004
+++ FTP.pm Tue Jan 27 14:51:25 2004
@@ -590,6 +590,7 @@
my $file;
foreach $file (map { m,/, ? $_ : "$dir/$_" } @$filelist)
{
+ next if $file =~ /\.{1,2}$/; # patch for stupid ftp servers
next # successfully deleted the file
if $ftp->delete($file);