[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kdecore/config
From: Michael Pyne <mpyne () purinchu ! net>
Date: 2009-02-22 23:17:54
Message-ID: 1235344674.020920.12342.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 930280 by mpyne:
Change searching for the various service types "apps", "services" and "xdgdata-apps" to be ok with
anything in the KDE install prefix. This isn't fully working yet but I have to leave and the alternative
is broken desktops for some people until I figure it out.
M +7 -6 kdesktopfile.cpp
--- trunk/KDE/kdelibs/kdecore/config/kdesktopfile.cpp #930279:930280
@@ -155,13 +155,14 @@
return true; // Relative paths are ok.
KStandardDirs *dirs = KGlobal::dirs();
- if (QDir::isRelativePath( dirs->relativeLocation("apps", path) ))
- return true;
- if (QDir::isRelativePath( dirs->relativeLocation("xdgdata-apps", path) ))
- return true;
- if (QDir::isRelativePath( dirs->relativeLocation("services", path) ))
- return true;
+ QStringList kdePrefixes ( dirs->kfsstnd_prefixes().split(QDir::separator()) );
+ // Check if the .desktop file is installed as part of KDE.
+ foreach (const QString &prefix, kdePrefixes) {
+ if (path.startsWith(prefix))
+ return true;
+ }
+
// Not otherwise permitted, so only allow if the file is executable, or if
// owned by root (uid == 0)
QFileInfo entryInfo( path );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic