KRun and Redirection
David Faure
faure at kde.org
Sun Apr 18 19:36:06 BST 2004
On Wednesday 14 April 2004 20:56, Dawit A. wrote:
> KRun currently ignores any redirection requests that come via its uses of
> KIO::*Job. Is this done on purpose ? I run into this issue while trying to
> fix a problem in kio_sftp where "sftp://host" was not being correctly
> redirected to "sftp://host/home/user" based on the logged in user's name
> during a ::stat call. The redirection that resulted is completely ignored by
> KRun (KonqRun actually) and hence the app assumes everything is fine and
> continues to use the original URL...
KRun itself doesn't really need to handle redirects - if a new process is started
with the given URL, it will fetch it again and get the same redirect.
But the derived KParts::BrowserRun does handle redirections, by updating
the URL in BrowserRun::slotBrowserMimeType().
KonqRun goes one step further and even has a slotRedirection, mostly
for the history feature though.
Hmm, but you're talking about ::stat, not about ::mimetype... Why should
redirections in ::stat() matter? There again, if KRun finds out "it's a directory"
it will open it (and get redirected again), and if it finds out "it's a file", it
will start retreiving it to find the mimetype and we're in the above case
(slotBrowserMimeType).
--
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the kde-core-devel
mailing list