- Fixed bug #39653 (ext/dba doesn't check for db-4.5 and db-4.4 when db4
support is enabled). (Tony)
- Fixed bug #39583 (ftp_put() does not change transfer mode to ASCII). (Tony)
+- Fixed bug #39458 (ftp_nlist() returns false on empty dirs). (Nuno)
- Fixed bug #39354 (Allow building of curl extension against libcurl
7.16.0). (Ilia)
- Fixed bug #39034 (curl_exec() with return transfer returns TRUE on empty
if (!ftp_putcmd(ftp, cmd, path))
goto bail;
- if (!ftp_getresp(ftp) || (ftp->resp != 150 && ftp->resp != 125))
+ if (!ftp_getresp(ftp) || (ftp->resp != 150 && ftp->resp != 125 && ftp->resp != 226))
goto bail;
+ /* some servers don't open a ftp-data connection if the directory is empty */
+ if (ftp->resp == 226) {
+ return ecalloc(1, sizeof(char**));
+ }
+
/* pull data buffer into tmpfile */
if ((data = data_accept(data, ftp)) == NULL)
goto bail;