forked from mirrors/nixpkgs
40 lines
1.8 KiB
Diff
40 lines
1.8 KiB
Diff
From b1c0d2542234247a5051df015d70347597dfe8d8 Mon Sep 17 00:00:00 2001
|
|
From: Thomas Tuegel <ttuegel@mailbox.org>
|
|
Date: Sun, 28 Mar 2021 10:26:40 -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 f03d882..d5aee56 100644
|
|
--- a/src/kpackage/packageloader.cpp
|
|
+++ b/src/kpackage/packageloader.cpp
|
|
@@ -234,7 +234,7 @@ QList<KPluginMetaData> PackageLoader::listPackages(const QString &packageFormat,
|
|
} else {
|
|
qCDebug(KPACKAGE_LOG) << "kpluginindex: Not cached" << plugindir;
|
|
// 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 = {QStringLiteral("metadata.json"), 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 3eed307..dd6ca6e 100644
|
|
--- a/src/kpackage/private/packagejobthread.cpp
|
|
+++ b/src/kpackage/private/packagejobthread.cpp
|
|
@@ -108,7 +108,7 @@ bool indexDirectory(const QString &dir, const QString &dest)
|
|
|
|
QJsonArray plugins;
|
|
|
|
- QDirIterator it(dir, *metaDataFiles, QDir::Files, QDirIterator::Subdirectories);
|
|
+ QDirIterator it(dir, *metaDataFiles, QDir::Files, QDirIterator::Subdirectories | QDirIterator::FollowSymlinks);
|
|
while (it.hasNext()) {
|
|
it.next();
|
|
const QString path = it.fileInfo().absoluteFilePath();
|
|
--
|
|
2.30.1
|
|
|