steve-m-hay/perl-libnet — pull request #11 by ColMelvin (2014-12-03 22:19:12+00:00)
Title: Make rmdir() more robust against faulty FTP servers

[RT #100694] Some FTP servers simply don't process NLST properly. Use the
RFC standardized MLSD command first, then fallback onto NLST if no data is
provided.

Caveat: MLSD will return 501 if given a file instead of a directory. We
ignore this error and try NLST anyway. That command should subsequently
fail and then we return the empty list.