Translation of \\foo\bar links into smb://foo/bar links

Thiago Macieira thiago.macieira at kdemail.net
Tue Jan 18 00:19:39 GMT 2005


Jason Keirstead wrote:
>Where would I look for the code that handles default consatruction of
> URLs in kurl.cpp?
>
>Namely, I am looking for the code that would turn a URL like this:
>
> \\Server\Share

That's not a URL.

> file://Server\Share

That's a valid URL to / on server "Server\Share", using protocol file. It 
is not what you want.

>I know that it doesn't know what it is so it is defaulting to file, but
> I hoped I could change the default for URLs that start with \\ to be
> smb://. This would make KDE much more compatible in a Windows-centric
> office, where people often send emails with links to SMB shares in
> them.

file://hostname/ is redirected to another protocol, defaulting to smb. So 
automatically file://servername/sharename goes to 
smb://servername/sharename.

That happens at kioslave level, not KURL.

>I tried finding the right code, and ended up with the patch below, but
> it does not seem to suffice. I think I need to do something else in the
> paseURL function, but I really got lost in there. Any pointers?

I don't like it.

-- 
  Thiago Macieira  -  thiago (AT) macieira (DOT) info
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

2. Tó cennan his weorc gearu, ymbe se circolwyrde, wearð se cægbord and se 
leohtspeccabord, and þa mýs cómon lator. On þone dæg, he hine reste.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20050117/f61de3d8/attachment.sig>


More information about the kde-core-devel mailing list