Fix ftp_size() returning bogus results.

# make sure the server is in BINARY mode before requesting file size.
This commit is contained in:
Vlad Krupin 2002-03-18 22:26:32 +00:00
parent 46315144ee
commit 7139845af9

View File

@ -685,6 +685,8 @@ ftp_size(ftpbuf_t *ftp, const char *path)
if (ftp == NULL)
return -1;
if (!ftp_type(ftp, FTPTYPE_IMAGE))
return -1;
if (!ftp_putcmd(ftp, "SIZE", path))
return -1;
if (!ftp_getresp(ftp) || ftp->resp != 213)