Handle absolute urls in Document::processAction

BUGS: 472440
This commit is contained in:
Albert Astals Cid 2023-07-23 18:28:03 +02:00
parent ad97329acd
commit 29810ad3dd

View file

@ -4288,8 +4288,13 @@ void Document::processAction(const Action *action)
}
// handle documents with relative path
QUrl realUrl;
if (d->m_url.isValid()) {
const QUrl realUrl = KIO::upUrl(d->m_url).resolved(url);
realUrl = KIO::upUrl(d->m_url).resolved(url);
} else if (!url.isRelative()) {
realUrl = url;
}
if (realUrl.isValid()) {
// KRun autodeletes
KRun *r = new KRun(realUrl, d->m_widget);
r->setRunExecutables(false);