D12371: fix always reproducible crash
    David Faure 
    noreply at phabricator.kde.org
       
    Sat Apr 28 10:14:45 UTC 2018
    
    
  
dfaure requested changes to this revision.
dfaure added inline comments.
This revision now requires changes to proceed.
INLINE COMMENTS
> kfilewidget.cpp:1523
>      // append '/' if needed: url combo does not add it
>      // tokenize() expects it because uses KUrl::setFileName()
>      QUrl u(url);
This needs to be updated btw, to "because it uses QUrl::adjusted(QUrl::RemoveFilename)", but I think the idea remains the same.
> kfilewidget.cpp:1525
>      QUrl u(url);
> -    if (!u.path().endsWith('/')) {
> +    if (u.isLocalFile() && !u.path().endsWith('/')) {
>          u.setPath(u.path() + '/');
I don't think this is correct, we still need that code to be called for ftp:// and similar.
I think this needs to be if (!u.path().isEmpty()) so that only smb:// and ftp://host (which is supposed to redirect to the home dir) are untouched, and everything else gets a trailing slash.
Thanks for the investigation.
REPOSITORY
  R241 KIO
REVISION DETAIL
  https://phabricator.kde.org/D12371
To: jtamate, dfaure, #frameworks, apol
Cc: anthonyfieroni, apol, michaelh, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180428/53b9ac62/attachment.html>
    
    
More information about the Kde-frameworks-devel
mailing list