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

List:       kde-core-devel
Subject:    Re: again ioslaves: how to append a "/" after the host ? (like the ftp-ioslave)
From:       David Faure <david () mandrakesoft ! com>
Date:       2000-06-25 22:34:12
[Download RAW message or body]

On Sun, Jun 25, 2000 at 08:56:23PM +0200, aleXXX wrote:
> On Fri, 23 Jun 2000, David Faure wrote:
> >On Fri, Jun 23, 2000 at 06:06:09PM +0200, aleXXX wrote:
> >> On Fri, 23 Jun 2000, David Faure wrote:
> >> >On Fri, Jun 23, 2000 at 05:20:02PM +0200, aleXXX wrote:
> >> In the smb ioslave it works a bit different, I can enter "smb://some_host", and
> >> if I go into the directory "some_share" a slash is inserted between the two
> >> parts. Do you know if this is simpler ? 
> >
> >No, you need to emit a redirection, otherwise you'll end up with
> >smb://some_hostsome_share (I guess that's what you get currently).
> >But you case is a lot more simpler than kio_ftp's.
> >Just do, in listDir
> >
> > if ( path.isEmpty() )
> > {
> >    url.setPath("/");
> >    emit redirection( url );
> > }
> 
> Ok, but why don't I return after the emit ?

Because for listDir, a redirection is just an information emitted
by the slave, which has to go on and proceed with doing the listing.

I realise it's inconsistent with redirections emitted by ::get, but
it's different. A get might redirect to another protocol, another mimetype,
etc.. A list dir only redirects to another path, so the slave can proceed.

-- 
David FAURE, david@mandrakesoft.com, faure@kde.org
http://home.clara.net/faure/, http://www.konqueror.org/
KDE, Making The Future of Computing Available Today
See http://www.kde.org/kde1-and-kde2.html for how to set up KDE 2

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

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