[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-frameworks-devel
Subject:    Re: kio and scheme://
From:       David Faure <faure () kde ! org>
Date:       2014-11-04 20:49:03
Message-ID: 1790282.EQEataOF6y () asterix
[Download RAW message or body]

On Sunday 02 November 2014 23:23:55 Milian Wolff wrote:
> On Sunday 02 November 2014 13:43:50 Àlex Fiestas wrote:
> > Hi there
> > 
> > There are quite a few places where the following code is found:
> > 
> > if (!url.path().endsWith('/')) {
> > 
> >     url.setPath(url.path() + '/');
> > 
> > }
> 
> Unrelated to the below, this will also add a trailing slash to non-empty
> paths, preventing files from getting opened.

This is why we only do this for directories :

> > 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:///.
> 
> Which is correct, no? An URL protocol is separated by ://. That's also why
> you need to type file:///tmp/bla/blub or the like. Missing a slash at the
> beginning will fail in all browsers I tested.

Yes but smb:/// means "a path of /" which is nonsense.
smb:// is supposed to show you a list of servers to choose from. Too early to 
even choose a path...

> What does "http://" mean?

Nothing, because http has no support for an empty host name. But smb does.

-- 
David Faure, faure@kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5

_______________________________________________
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic