summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2021-01-03 21:52:05 +0900
committerSlávek Banko <slavek.banko@axis.cz>2021-02-03 23:07:27 +0100
commite3a83543806f2ac4bad20f2cb6b82ef39c6c0f2c (patch)
tree6f27854bbd2131c948c6b6cfaf7a8bafda9b6a99
parent43b41be84b75d3546be32dd2e5cc25c2481739ce (diff)
downloadtdelibs-e3a83543806f2ac4bad20f2cb6b82ef39c6c0f2c.tar.gz
tdelibs-e3a83543806f2ac4bad20f2cb6b82ef39c6c0f2c.zip
krun: prevent media:/ or system:/media urls to be replaced by their respective /media/... path.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit 3d3e77773df70317267c2d471c37e9374256590d)
-rw-r--r--kio/kio/krun.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/kio/kio/krun.cpp b/kio/kio/krun.cpp
index 7b278d2cd..58926eac8 100644
--- a/kio/kio/krun.cpp
+++ b/kio/kio/krun.cpp
@@ -724,7 +724,8 @@ static KURL::List resolveURLs( const KURL::List& _urls, const KService& _service
const KURL url = *it;
bool supported = url.isLocalFile() || supportedProtocols.find( url.protocol().lower() ) != supportedProtocols.end();
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?
KURL localURL = KIO::NetAccess::mostLocalURL( url, 0 );