ProFTPD1.3.0a NLST patch for FFFTP created by http://www.hayasoft.com/haya/ date 2007/01/04 19:27 (Japan) --- proftpd-1.3.0a/modules/mod_ls.c 2005-08-25 01:10:30.000000000 +0900 +++ proftpd-1.3.0a/modules/mod_ls_new.c 2005-11-03 18:50:17.000000000 +0900 @@ -1160,10 +1160,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': @@ -1171,15 +1169,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': @@ -1187,16 +1181,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': @@ -2007,6 +1997,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;