diff options
author | Graham Barr <gbarr@pobox.com> | 2010-03-10 21:20:46 -0600 |
---|---|---|
committer | Graham Barr <gbarr@pobox.com> | 2010-03-10 21:20:46 -0600 |
commit | fca945224a9bdd7853b1c7b528f1a506426b32de (patch) | |
tree | 5ffb05bae6674e9c95f114308a513994fd8fa48e | |
parent | 73dc7393a40391c5cae9d398135813a3bc45df47 (diff) | |
download | perl-libnet-fca945224a9bdd7853b1c7b528f1a506426b32de.tar.gz |
Avoid infinite recursion in rmdir
-rw-r--r-- | Net/FTP.pm | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -590,6 +590,9 @@ sub rmdir { return undef unless @filelist; # failed, it is probably not a directory + return $ftp->delete($dir) + if @filelist == 1 and $dir eq $filelist[0]; + # Go thru and delete each file or the directory my $file; foreach $file (map { m,/, ? $_ : "$dir/$_" } @filelist) { |