Review Request 116523: Do not call ftpSendMimeType for empty files in Ftp::ftpGet

Dawit Alemayehu adawit at kde.org
Wed Mar 5 12:43:24 GMT 2014



> On March 4, 2014, 7:42 p.m., David Faure wrote:
> > I don't get it. What's the problem with sending a mimetype for empty files? I would think this is actually expected - for all files, including empty ones. Why does this fix the bug?

It fails and ends up sending an error message. See the if statement in while(true) loop in ftpSendMimeType. Even if that check does not fail and  the while(true) loop completes successfully, the next statement "if (!buffer.isEmpty())" will be false for empty files. Hence it is completely useless to call ftpSendMimeType from ftpGet for empty files.


- Dawit


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/116523/#review51922
-----------------------------------------------------------


On March 2, 2014, 2:20 p.m., Dawit Alemayehu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/116523/
> -----------------------------------------------------------
> 
> (Updated March 2, 2014, 2:20 p.m.)
> 
> 
> Review request for kdelibs and David Faure.
> 
> 
> Bugs: 323491
>     http://bugs.kde.org/show_bug.cgi?id=323491
> 
> 
> Repository: kdelibs
> 
> 
> Description
> -------
> 
> The attached patch fixes a bug where copying empty files (size == 0) from an ftp server to any other remote server (sftp, ftp) results in an error message that states the file could not be opened.
> 
> 
> Diffs
> -----
> 
>   kioslave/ftp/ftp.cpp 5bb2e8d 
> 
> Diff: https://git.reviewboard.kde.org/r/116523/diff/
> 
> 
> Testing
> -------
> 
> Attempt to copy an empty file from any ftp server to a remote destination, e.g. sftp server.
> 
> 
> Thanks,
> 
> Dawit Alemayehu
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20140305/9137f0ec/attachment.htm>


More information about the kde-core-devel mailing list