Bug 123011 - kfmclient exec with anchor URL discards anchor
Summary: kfmclient exec with anchor URL discards anchor
Status: RESOLVED FIXED
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-03 11:56 UTC by Martin Koller
Modified: 2006-08-16 21:54 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Koller 2006-03-03 11:56:01 UTC
Version:            (using KDE KDE 3.5.1)
Installed from:    Compiled From Sources
OS:                Linux

kfmclient exec file:/tmp/h#123

(where konqi is my default browser)

opens konqi with "file:/tmp/h"  => so it removes the anchor

When I start konqueror file:/tmp/h#123
this works correctly.

I can not use openURL instead, because this does not honor the filetype
setting (e.g. starting netscape instead)
Comment 1 Thiago Macieira 2006-03-04 15:15:46 UTC
I can confirm this, 3.5 r512077.
Comment 2 Kevin Krammer 2006-08-13 14:52:28 UTC
I tracked it down to KRunMX2::subst where it treats URLs of local files differently in the case of %u being specified in the application's .desktop file

Stephan Kulow thinks it might be an overoptimization.

Something like this could help:
Index: krun.cpp
===================================================================
--- krun.cpp    (Revision 572496)
+++ krun.cpp    (Arbeitskopie)
@@ -296,7 +296,7 @@
 {
    switch( option ) {
    case 'u':
-      ret << (url.isLocalFile() ? url.path() : url.url());
+      ret << url.url();
       break;
    case 'd':
       ret << url.directory();

I am reassing it to kdelibs, maybe someone with more knowledge about KIO can have a look at it
Comment 3 David Faure 2006-08-16 21:54:26 UTC
Fixed with pathOrUrl() to avoid confusing apps with file urls in the common case (no query & no ref).