allow -l to LIST current directory

some clients, including Chrome, use LIST -l and expect to obtain a file listing. Fixes #64
This commit is contained in:
Dave Murphy 2017-02-02 19:04:50 +00:00
parent 2a7aa4955e
commit fc95abd9f2

View File

@ -2415,8 +2415,7 @@ ftp_xfer_dir(ftp_session_t *session,
/* work around broken clients that think LIST -a is a thing */ /* work around broken clients that think LIST -a is a thing */
if(workaround && mode == XFER_DIR_LIST) if(workaround && mode == XFER_DIR_LIST)
{ {
if(args[0] == '-' && args[1] == 'a') if(args[0] == '-' && (args[1] == 'a' || args[1] == 'l')) {
{
if(args[2] == 0) if(args[2] == 0)
buffer = strdup(args+2); buffer = strdup(args+2);
else else