krun: prevent media:/ or system:/media urls to be replaced by their respective /media/... path.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/116/head
Michele Calgaro 4 years ago
parent 05ee12e2df
commit 3d3e77773d
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -724,7 +724,8 @@ static KURL::List resolveURLs( const KURL::List& _urls, const KService& _service
const KURL url = *it; const KURL url = *it;
bool supported = url.isLocalFile() || supportedProtocols.find( url.protocol().lower() ) != supportedProtocols.end(); bool supported = url.isLocalFile() || supportedProtocols.find( url.protocol().lower() ) != supportedProtocols.end();
kdDebug(7010) << "Looking at url=" << url << " supported=" << supported << endl; kdDebug(7010) << "Looking at url=" << url << " supported=" << supported << endl;
if ( !supported && KProtocolInfo::protocolClass(url.protocol()) == ":local" ) if ( !supported && KProtocolInfo::protocolClass(url.protocol()) == ":local" &&
!url.url().startsWith("media:/") && !url.url().startsWith("system:/media"))
{ {
// Maybe we can resolve to a local URL? // Maybe we can resolve to a local URL?
KURL localURL = TDEIO::NetAccess::mostLocalURL( url, 0 ); KURL localURL = TDEIO::NetAccess::mostLocalURL( url, 0 );

Loading…
Cancel
Save