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

David Faure faure at kde.org
Wed Mar 12 12:54:14 GMT 2014


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



kioslave/ftp/ftp.cpp
<https://git.reviewboard.kde.org/r/116523/#comment37197>

    A bit hard to read compared to
     if (m_size != 0) { while(true) { ... } }
    because m_size doesn't change, so it's weird to read "while the size is not 0" - it either was, or it will never be.



kioslave/ftp/ftp.cpp
<https://git.reviewboard.kde.org/r/116523/#comment37198>

    the alternative to the if+while is to just if(m_size==0) { mimeType(zerosize); return; } before the while.


- David Faure


On March 12, 2014, 12:47 p.m., Dawit Alemayehu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/116523/
> -----------------------------------------------------------
> 
> (Updated March 12, 2014, 12:47 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 ddc6eaf 
> 
> 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/20140312/2a285bf1/attachment.htm>


More information about the kde-core-devel mailing list