Check for actual metadata file, else it will try to load the plasmoid from ~/.kde if only the directory exists even though the plasmoid might be in /usr

BUG:231761
"Python plasmoids can no longer run from system directory"


svn path=/trunk/KDE/kdelibs/; revision=1108640
This commit is contained in:
Jonathan Riddell 2010-03-29 13:55:07 +00:00
parent aeb6fdb3cb
commit 9ea9f63a7e

View File

@ -2583,7 +2583,8 @@ void AppletPrivate::init(const QString &packagePath)
// find where the Package is
QString path = packagePath;
if (path.isEmpty()) {
path = KStandardDirs::locate("data", "plasma/plasmoids/" + appletDescription.pluginName() + '/');
path = KStandardDirs::locate("data", "plasma/plasmoids/" + appletDescription.pluginName() + "/metadata.desktop");
path.replace(QString("/metadata.desktop"),QString("/"));
} else if (!path.endsWith('/')) {
path.append('/');
}