Version: (using KDE KDE 3.3.91) Installed from: Slackware Packages I use a lot the drag'n drop between konqueror and konsole, especially the "cd" option but with the new media:/ io-slave the path dropped on konsole of course is not a valid unix pathname, but that media:/ url correspond to a real pathname so it wouldn't be possible to convert the url into the corresponding pathname when dropped on apps that doesn't know about kio?
SVN commit 418162 by hindenburg: Use mostLocalURL on dropped URLs, helpful for media:/. BUG: 98879 M +2 -1 TEWidget.cpp --- trunk/KDE/kdebase/konsole/konsole/TEWidget.cpp #418161:418162 @@ -73,6 +73,7 @@ #include <kglobalsettings.h> #include <kshortcut.h> #include <kurldrag.h> +#include <kio/netaccess.h> #include <qlabel.h> #include <qtimer.h> @@ -2148,7 +2149,7 @@ dropText += " "; m_drop->setItemEnabled(cd,false); } - KURL url = *it; + KURL url = KIO::NetAccess::mostLocalURL( *it, 0 ); QString tmp; if (url.isLocalFile()) { tmp = url.path(); // local URL : remove protocol. This helps "ln" & "cd" and doesn't harm the others
In kde 3.4.1 debian, it isn't resolved. It fails, and not paste the correct path. It paste " kfmclient copy 'media:/hdd' . " and if you use F4 key in konqueror to open a konsole in a media:/ path, it open your HOME directory because it doesn't know media:/ path
The fix isn't in KDE 3.4.1.
KIO::NetAccess::mostLocalURL was added for KDE 3.5. Hence this can't be back-ported to 3.4.x.
Kurt: you can KIO::stat and check if a UDS_LOCAL_PATH (= 72 | UDS_STRING) was returned. You won't have the constant, though, so you'll have to go with the value.