ftp.c: LIST: partially handle: -al: No such file
It's a server that always replies with messages instead of codes
it's a TODO to fix
LIST -al
150 Opening BINARY mode data connection for '-al'.
Warning: Cannot parse listing ftpd: -al: No such file or directory
226 Transfer complete.
@@ -1565,9 +1565,18 @@ int ftp_get_next_file (gftp_request * request, gftp_file * fle, int fd)
if (strncmp (tempstr, "total", strlen ("total")) != 0 &&
strncmp (tempstr, _("total"), strlen (_("total"))) != 0)
{
+ if (strstr(tempstr,"-al") && (strstr(tempstr,"No such") || strstr(tempstr,"no such")))
+ {
+ // TODO: trigger a LIST again
+ ftpdat->feat[FTP_FEAT_LIST_AL] = 0;
+ request->logging_function (gftp_logging_error, request,
+ "It looks like LIST -al is not supported\n");
+
+ } else {
request->logging_function (gftp_logging_error, request,
_("Warning: Cannot parse listing %s\n"), tempstr);
}
+ }
gftp_file_destroy (fle, 0);
continue;
}
