[PATCH] Copying from non-local file to sftp kioslave fails
thiago at kde.org
Sun Dec 28 18:52:14 GMT 2008
Michael Leupold wrote:
>this fixes the problems that pop up when copying files from a non-local
> source to an sftp destination (eg sftp/tar/smb => sftp).
>The main problem is that KIO::SlaveBase::readData(buffer) nulls the
> buffer if there's no data to read. sftpProtocol::sftpWrite outputs such
> a nulled buffer to a QDataStream which outputs 0xffffffff instead of
> the expected empty string (please note that this only happens at EOF).
>Not writing if there's nothing more to write seems like the best
> solution. I checked the RFC and openssh's sftp and there's no need to
> do an "empty" write at the end of the file.
>Still it would be great if someone could take a second look at it.
A zero-read (empty buffer) means end-of-file in KIO. It should never be
sent, unless it's an actual EOF.
However, can you verify that this isn't the actual case of EOF?
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: This is a digitally signed message part.
More information about the kde-core-devel