--- afd-1.3.3/src/fd/get_remote_file_names_ftp.c.orig 2006-06-30 10:26:58.000000000 +0200 +++ afd-1.3.3/src/fd/get_remote_file_names_ftp.c 2006-09-20 13:10:31.000000000 +0200 @@ -124,13 +124,22 @@ exitflag = 0; exit(TRANSFER_SUCCESS); } - else - { - trans_log(ERROR_SIGN, __FILE__, __LINE__, msg_str, - "Failed to send NLST command (%d).", status); - (void)ftp_quit(); - exit(LIST_ERROR); - } + else if (status == 226) + { + remove_ls_data(); + trans_log(INFO_SIGN, __FILE__, __LINE__, msg_str, + "No files found (%d).", status); + (void)ftp_quit(); + exitflag = 0; + exit(TRANSFER_SUCCESS); + } + else + { + trans_log(ERROR_SIGN, __FILE__, __LINE__, msg_str, + "Failed to send NLST command (%d).", status); + (void)ftp_quit(); + exit(LIST_ERROR); + } } else {