utils/serviceutils: compare executablePath against canonical path of exec fields in .desktops
/proc/%/exec always points to the canonical/real path of a binary, the exec field of a .desktop might contain a symlink and therefore differ from canonical path. Explicitely canonicalizing the path in exec prevents this mismatch.
This commit is contained in:
parent
8e05732670
commit
9c65d61b98
1 changed files with 1 additions and 1 deletions
|
@ -32,7 +32,7 @@ static QStringList fetchProcessServiceField(const QString &executablePath, const
|
|||
static QLoggingCategory KWIN_UTILS ("KWIN_UTILS", QtWarningMsg);
|
||||
const auto servicesFound = KApplicationTrader::query([&executablePath] (const KService::Ptr &service) {
|
||||
|
||||
if (service->exec().isEmpty() || service->exec() != executablePath)
|
||||
if (service->exec().isEmpty() || QFileInfo(service->exec()).canonicalFilePath() != executablePath)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue