ProFTPD1.2.10 NLST patch for FFFTP created by http://www.hayasoft.com/ date 2004/11/14 11:09 (Japan) --- proftpd-1.2.10/modules/mod_ls.c 2004-05-08 06:31:30.000000000 +0900 +++ proftpd-1.2.10/modules/mod_ls_new.c 2004-11-13 15:18:15.000000000 +0900 @@ -1104,10 +1104,8 @@ break; case 'C': - if (strcmp(session.curr_cmd, C_NLST) != 0) { - opt_l = 0; - opt_C = 1; - } + opt_l = 0; + opt_C = 1; break; case 'd': @@ -1115,15 +1113,11 @@ break; case 'F': - if (strcmp(session.curr_cmd, C_NLST) != 0) { - opt_F = 1; - } + opt_F = 1; break; case 'h': - if (strcmp(session.curr_cmd, C_NLST) != 0) { - opt_h = 1; - } + opt_h = 1; break; case 'L': @@ -1131,16 +1125,12 @@ break; case 'l': - if (strcmp(session.curr_cmd, C_NLST) != 0) { - opt_l = 1; - opt_C = 0; - } + opt_l = 1; + opt_C = 0; break; case 'n': - if (strcmp(session.curr_cmd, C_NLST) != 0) { - opt_n = 1; - } + opt_n = 1; break; case 'R': @@ -1916,6 +1906,10 @@ list_nfiles.curr = list_ndirs.curr = list_ndepth.curr = 0; list_nfiles.logged = list_ndirs.logged = list_ndepth.logged = FALSE; + /* In case the client used NLST instead of LIST. */ + if (cmd->argc > 1 && cmd->argv[1][0] == '-') + return genericlist(cmd); + tmp = get_param_ptr(TOPLEVEL_CONF, "ShowSymlinks", FALSE); if (tmp != NULL) list_show_symlinks = *tmp;