[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Another kfm fix, for FTP protocol
From: Johannes Sixt <Johannes.Sixt () telecom ! at>
Date: 1999-01-26 20:17:19
[Download RAW message or body]
On Tue, 26 Jan 1999, David Faure wrote:
>>You might have noticed that from some FTP servers, every file you try to
>download with kfm arrives empty on your hard disk.
>
>The attached patch fixes it.
>Please test it, I think it's an important fix that I would like to see in
>1.1
>
>As for the other one, please send me an e-mail if you tested it, even if it
>worked flawlessly, otherwise I'll never know if I can apply it.
In order to avoid overflows, you better use:
/** Use the SIZE command to get the file size. David. */
long KProtocolFTP::ftpSize( const char *path)
{
QString cmd = "SIZE ";
ftplib_lastresp[0] = '\0';
cmd += path;
if (!ftpSendCmd(cmd,'2'))
return FAIL;
return atol(rspbuf+4); // skip leading "213 " (response code)
}
BTW, is SIZE a required, standard FTP command? (I don't know anything about the
corresponding RFC.)
-- Hannes
PS: I didn't test it, I'm lazy^H^H^H^Hbusy, very busy.
;-)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic