D13674: Make it possible to go up to root again

David Faure noreply at phabricator.kde.org
Fri Jun 22 09:54:41 UTC 2018


dfaure requested changes to this revision.
dfaure added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> kfilewidget.cpp:1547
>      QUrl u(url);
> -    if (!u.path().isEmpty()) {
> +    if (u != fileRootUrl && !u.path().isEmpty()) {
>          u.setPath(u.path() + '/');

Shouldn't this be generalized to all schemes? I.e.

  if (!u.path().isEmpty() && u.path() != "/")

We don't want to turn smb:/// into smb:////.

But wait, we also simply don't want to append a slash if there was already one.
The comment says "if needed", the code doesn't check for that.

New suggestion:

  if (!u.path().isEmpty() && !u.path().endsWith('/'))

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D13674

To: jtamate, dfaure, #frameworks
Cc: kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180622/7fe94817/attachment.html>


More information about the Kde-frameworks-devel mailing list