Commit bdaafe02 authored by Dāvis Mosāns's avatar Dāvis Mosāns Committed by Harald Sitter
Browse files

Support `mtp:` URL

Currently we would support only `mtp:/` but there's no reason
to have such limitation
parent a71b56c0
Pipeline #165928 passed with stage
in 4 minutes and 43 seconds
......@@ -151,6 +151,13 @@ enum MTPSlave::Url MTPSlave::checkUrl(const QUrl &url)
}
if (url.path().startsWith(QLatin1Char('/'))) {
return Url::Valid;
} else if (url.scheme() == QLatin1String("mtp") && url.path().isEmpty()) {
QUrl newUrl;
newUrl.setScheme(url.scheme());
newUrl.setPath(QLatin1String("/"));
redirection(newUrl);
return Url::Redirected;
}
return Url::Invalid;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment