[PATCH] Multiple redirections and KDirListerCache
Hamish Rodda
meddie at yoyo.its.monash.edu.au
Mon Sep 2 12:04:38 BST 2002
On Mon, 2 Sep 2002 08:39 pm, David Faure wrote:
> Huh? All the urls within KDirLister are supposed to be normalized
> to "no trailing slash". forgetDirs() does use url(-1) ... and I just
> checked all the lines adding entries to urlsCurrentlyHeld[], they all use
> url(-1) too.
Ah, I see... the attached patch does this the "right way" now. It's a bit
messy because I couldn't modify the const url directly. How's this?
> > I thought this strange too. KFileDialog is the one requesting the list()
> > without stat() - I guess this is because the request is only triggered by
> > a URL with a trailing slash.
>
> From webdav.protocol:
> defaultMimetype=application/octet-stream
> determineMimetypeFromExtension=false
> So the trailing slash leads KMimeType::findByURL to say "unknown", not
> "it's a dir". So I don't think the trailing slash is the reason here.
KFileDialog.cpp, line 1107:
// typing forward, ending with a / -> cd into the directory
else if ( autoDirectoryFollowing &&
text.at(text.length()-1) == '/' && ops->url() != text ) {
d->selection = QString::null;
setURL( text, false );
}
Now that I look closer though it would appear to be KDirOperator's fault for
not calling stat()...?
> > I don't know what to do with it really - during a
> > list(), once a redirection is called, there isn't a stat() called anyway.
>
> Sure. As I said, it's too late at that point.
> In the file dialog, one can only see dir listings anyway, which is why it
> doesn't stat() first. If there's a redirection to a file, kfiledialog says
> "I can't list it", which is correct, no?
Yes, the behaviour is almost correct (my slave is forced to report "no such
file or directory" when it should be saying "file found instead of
directory").
Thanks for your help.
Cheers,
Hamish.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kio-kdirlistercache-20020902.patch
Type: text/x-diff
Size: 1943 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20020902/e9db6214/attachment.patch>
More information about the kfm-devel
mailing list