nixpkgs/pkgs/development/libraries/kde-frameworks-5.16/kpackage/0002-qdiriterator-follow-symlinks.patch
2015-11-23 06:39:04 -06:00

39 lines
1.8 KiB
Diff

From 9fc26c3c0478eb7cb0a531836ba2e3a85d820c88 Mon Sep 17 00:00:00 2001
From: Thomas Tuegel <ttuegel@gmail.com>
Date: Wed, 14 Oct 2015 06:50:28 -0500
Subject: [PATCH 2/2] qdiriterator follow symlinks
---
src/kpackage/packageloader.cpp | 2 +-
src/kpackage/private/packagejobthread.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/kpackage/packageloader.cpp b/src/kpackage/packageloader.cpp
index eb5ed47..94217f6 100644
--- a/src/kpackage/packageloader.cpp
+++ b/src/kpackage/packageloader.cpp
@@ -241,7 +241,7 @@ QList<KPluginMetaData> PackageLoader::listPackages(const QString &packageFormat,
} else {
//qDebug() << "Not cached";
// If there's no cache file, fall back to listing the directory
- const QDirIterator::IteratorFlags flags = QDirIterator::Subdirectories;
+ const QDirIterator::IteratorFlags flags = QDirIterator::Subdirectories | QDirIterator::FollowSymlinks;
const QStringList nameFilters = QStringList(QStringLiteral("metadata.desktop"));
QDirIterator it(plugindir, nameFilters, QDir::Files, flags);
diff --git a/src/kpackage/private/packagejobthread.cpp b/src/kpackage/private/packagejobthread.cpp
index ca523b3..1cfa792 100644
--- a/src/kpackage/private/packagejobthread.cpp
+++ b/src/kpackage/private/packagejobthread.cpp
@@ -145,7 +145,7 @@ bool indexDirectory(const QString& dir, const QString& dest)
QJsonArray plugins;
int i = 0;
- QDirIterator it(dir, QStringList()<<QStringLiteral("*.desktop"), QDir::Files, QDirIterator::Subdirectories);
+ QDirIterator it(dir, QStringList()<<QStringLiteral("*.desktop"), QDir::Files, QDirIterator::Subdirectories | QDirIterator::FollowSymlinks);
while (it.hasNext()) {
it.next();
const QString path = it.fileInfo().absoluteFilePath();
--
2.5.2