Skip Menu |

This queue is for tickets about the libnet CPAN distribution.

Report information
The Basics
Id: 5064
Status: resolved
Priority: 0/
Queue: libnet

People
Owner: Nobody in particular
Requestors: kreso [...] usa.net
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.17
Fixed in: (no value)



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);
From: Graham Barr <gbarr [...] pobox.com>
Subject: Re: [cpan #5064] recursive directory removal fails on some stupid ftp servers
Date: Fri, 30 Jan 2004 09:50:55 +0000
To: bug-libnet [...] rt.cpan.org
RT-Send-Cc:
On 27 Jan 2004, at 22:52, Guest via RT wrote: Show quoted text
> 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.
Thanks, But I think the RE should probably be /^\.{1,2}$/ or it would match any name ending with a period. Graham.