kio and scheme://

Àlex Fiestas afiestas at kde.org
Sun Nov 2 12:43:50 UTC 2014


Hi there

There are quite a few places where the following code is found:

if (!url.path().endsWith('/')) {
    url.setPath(url.path() + '/');
}

Given an url like: 'scheme://' KUrl will return '/' as path while QUrl returns 
empty string.

This is making kio add a third slash to the url in many places (because of 
code like the one pasted before).

As a result if you open dolphin and type smb://, it will be redirected to 
smb:///.

Is this an intended behavior or should I start sending patches to prevent this 
from happening?

Also, even though technically the path of 'smb://' is empty, users are used to 
that format (specially given how popular htp:// is) so I would like to keep 
supporting it.

Cheers!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20141102/3632947b/attachment.sig>


More information about the Kde-frameworks-devel mailing list