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

List:       kde-core-devel
Subject:    Re: system kioslave and KURL::isLocalFile()
From:       Kévin_Ottens <ervin () ipsquad ! net>
Date:       2005-07-27 8:00:13
Message-ID: 200507271000.18952.ervin () ipsquad ! net
[Download RAW message or body]


Le Mercredi 27 Juillet 2005 09:14, Andras Mantia a écrit :
> Isn't this a bit overkill? Static a file can be expensive and until now
> we could rely that isLocalFile() is a fast method. Can system:// and
> home:// be not a local file? If it cannot be, I think the check in KURL
> should be modified.

Well, the problem is not really there IMHO. In fact most applications expect 
that if isLocalFile() is true, then they can use the path as a unix path. So 
isLocalFile() is really synonym of protocol=="file" in the end. This check 
can't be changed it would break a lot of things.

As for the stat() cost, we might have a solution. We could introduce another 
flag for protocols indicating if they use UDS_LOCAL_PATH or not (this is the 
UDS Atom used to translate in local path). Then we could avoid the stat() in 
NetAccess::mostLocalURL() when this flag is false.

Regards.
-- 
Kévin 'ervin' Ottens, http://ervin.ipsquad.net
"Ni le maître sans disciple, Ni le disciple sans maître,
Ne font reculer l'ignorance."

[Attachment #3 (application/pgp-signature)]

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

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