Review Request 116524: Make kio_ftp work with ftp server that don't support absolute path with SIZE command

Dawit Alemayehu adawit at kde.org
Mon Mar 3 00:15:34 GMT 2014



> On March 2, 2014, 12:14 a.m., Dawit Alemayehu wrote:
> > I am curious if stripping the leading "/" and sending a relative path with the SIZE command would work for every FTP server?
> 
> David Faure wrote:
>     It's worth a try. I took at look at the very old svn history, and it has just always been an absolute path, we never tried relative.
>     (so it's not like this would be reverting some bugfix)
>     
>     I think it was just a way to avoid sending one more command (cwd). But it seems logical to do that (cwd, then size, then get).

Yeah well I changed my mind once I saw the amount of change I would have to make. I have to change how both ftpGet and ftpPut work since everything in kio_ftp uses absolute paths. Instead of changing something that already works quite well, I rather stick to this simple patch that retries the SIZE command for those few servers that do not support using it with absolute paths.

I have also updated the patch not to return an error by checking if m_iRespType != 2. Instead it should return UnknownSize. That way when a ftp server has no support or has a disabled SIZE command, kio_ftp will continue to work. This would solve a very old bug in kio_ftp #168011.


- Dawit


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


On March 2, 2014, 12:12 a.m., Dawit Alemayehu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/116524/
> -----------------------------------------------------------
> 
> (Updated March 2, 2014, 12:12 a.m.)
> 
> 
> Review request for kdelibs and David Faure.
> 
> 
> Bugs: 326292
>     http://bugs.kde.org/show_bug.cgi?id=326292
> 
> 
> Repository: kdelibs
> 
> 
> Description
> -------
> 
> This patch changes Ftp::ftpSize such that it has support for servers that do not allow absolute paths with the SIZE command. That means when sending the command "SIZE /somefile" fails, it will try sending "SIZE somefile" before giving up. See bug report for details.
> 
> 
> Diffs
> -----
> 
>   kioslave/ftp/ftp.cpp 5bb2e8d 
> 
> Diff: https://git.reviewboard.kde.org/r/116524/diff/
> 
> 
> Testing
> -------
> 
> Installed Ftp server from bug report on an Android device and run tests.
> 
> 
> Thanks,
> 
> Dawit Alemayehu
> 
>

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


More information about the kde-core-devel mailing list