Subject: | Net::FTP rmdir may return failure when it succeeds. |
Unless I'm missing something, this is a one-line fix.
I noted that rmdir in Net::FTP can return a failure indication even though the command succeeds. I noted the following code at the start of the function:
sub rmdir
{
@_ == 2 || @_ == 3 or croak('usage: $ftp->rmdir( DIR [, RECURSE ] )');
# Pick off the args
my ($ftp, $dir, $recurse) = @_ ;
my $ok;
return $ok
if $ftp->_RMD( $dir ) || !$recurse;
....
I changed the declaration of $ok to intialize to 1: