OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks/plasma6-vault?expand=0&rev=72
61 lines
2.0 KiB
Diff
61 lines
2.0 KiB
Diff
From a7e75c80c41b7fa7da5d28706268f5a7e42dd66a Mon Sep 17 00:00:00 2001
|
|
From: Fabian Vogt <fabian@ritter-vogt.de>
|
|
Date: Wed, 18 Jun 2025 20:40:17 +0200
|
|
Subject: [PATCH] Use fusermount3 if available
|
|
|
|
Avoid depending on an outdated version of libfuse.
|
|
---
|
|
kded/engine/fusebackend_p.cpp | 6 +++++-
|
|
kded/engine/fusebackend_p.h | 3 +++
|
|
2 files changed, 8 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/kded/engine/fusebackend_p.cpp b/kded/engine/fusebackend_p.cpp
|
|
index 9439c41..714b660 100644
|
|
--- a/kded/engine/fusebackend_p.cpp
|
|
+++ b/kded/engine/fusebackend_p.cpp
|
|
@@ -8,6 +8,7 @@
|
|
|
|
#include <QDir>
|
|
#include <QRegularExpression>
|
|
+#include <QStandardPaths>
|
|
#include <QUrl>
|
|
|
|
#include <KIO/DeleteJob>
|
|
@@ -60,7 +61,10 @@ void FuseBackend::removeDotDirectory(const MountPoint &mountPoint)
|
|
}
|
|
|
|
FuseBackend::FuseBackend()
|
|
+ : fusermountExecutable(QStringLiteral("fusermount3"))
|
|
{
|
|
+ if (QStandardPaths::findExecutable(fusermountExecutable).isEmpty())
|
|
+ fusermountExecutable = QStringLiteral("fusermount");
|
|
}
|
|
|
|
FuseBackend::~FuseBackend()
|
|
@@ -86,7 +90,7 @@ QProcess *FuseBackend::process(const QString &executable, const QStringList &arg
|
|
|
|
QProcess *FuseBackend::fusermount(const QStringList &arguments) const
|
|
{
|
|
- return process("fusermount", arguments, {});
|
|
+ return process(fusermountExecutable, arguments, {});
|
|
}
|
|
|
|
FutureResult<> FuseBackend::initialize(const QString &name, const Device &device, const MountPoint &mountPoint, const Vault::Payload &payload)
|
|
diff --git a/kded/engine/fusebackend_p.h b/kded/engine/fusebackend_p.h
|
|
index 17a37ad..dea732c 100644
|
|
--- a/kded/engine/fusebackend_p.h
|
|
+++ b/kded/engine/fusebackend_p.h
|
|
@@ -47,6 +47,9 @@ protected:
|
|
// Check the contents of the dir (should be empty) and if the only item
|
|
// there is the dot-directroy, delete it.
|
|
static void removeDotDirectory(const MountPoint &mountPoint);
|
|
+
|
|
+ // fusermount3 if possible, otherwise fusermount
|
|
+ QString fusermountExecutable;
|
|
};
|
|
|
|
} // namespace PlasmaVault
|
|
--
|
|
2.49.0
|
|
|