Commit 108d408d authored by Ivan Čukić's avatar Ivan Čukić 👁

Allowing custom options to be passed to encfs and cryfs

BUG:396621
parent 42723bb3
......@@ -29,6 +29,8 @@
#include <KMountPoint>
#include <KLocalizedString>
#include <KSharedConfig>
#include <KConfigGroup>
#include <algorithm>
......@@ -236,8 +238,11 @@ bool CryFsBackend::isInitialized(const Device &device) const
QProcess *CryFsBackend::cryfs(const QStringList &arguments) const
{
auto config = KSharedConfig::openConfig(PLASMAVAULT_CONFIG_FILE);
KConfigGroup backendConfig(config, "CryfsBackend");
return process("cryfs",
arguments,
arguments + backendConfig.readEntry("extraMountOptions", QStringList{}),
{ { "CRYFS_FRONTEND", "noninteractive" } });
}
......
......@@ -26,6 +26,8 @@
#include <KMountPoint>
#include <KLocalizedString>
#include <KSharedConfig>
#include <KConfigGroup>
#include <algorithm>
......@@ -132,7 +134,12 @@ bool EncFsBackend::isInitialized(const Device &device) const
QProcess *EncFsBackend::encfs(const QStringList &arguments) const
{
return process("encfs", arguments, {});
auto config = KSharedConfig::openConfig(PLASMAVAULT_CONFIG_FILE);
KConfigGroup backendConfig(config, "EncfsBackend");
return process("encfs",
arguments + backendConfig.readEntry("extraMountOptions", QStringList{}),
{});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment