From 7f99f8803d0d28128e29c2ccebd9899c40b6ef29 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Wed, 18 Oct 2023 15:26:07 +0200 Subject: [PATCH] Remove deprecated option `--confdir` This was meant to be used before roaming profiles were supported on Windows. Fixes: #11246 --- src/gui/main.cpp | 8 -------- src/libsync/configfile.h | 1 + 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/gui/main.cpp b/src/gui/main.cpp index fa8a51d739c..81a878a4f30 100644 --- a/src/gui/main.cpp +++ b/src/gui/main.cpp @@ -127,7 +127,6 @@ CommandLineOptions parseOptions(const QStringList &arguments) auto logDirOption = addOption({QStringLiteral("logdir"), QStringLiteral("Write each sync log output in a new file in folder."), QStringLiteral("name")}); auto logFlushOption = addOption({QStringLiteral("logflush"), QStringLiteral("Flush the log file after every write.")}); auto logDebugOption = addOption({QStringLiteral("logdebug"), QStringLiteral("Output debug-level messages in the log.")}); - auto confDirOption = addOption({QStringLiteral("confdir"), QStringLiteral("Use the given configuration folder."), QStringLiteral("dirname")}); auto debugOption = addOption({QStringLiteral("debug"), QStringLiteral("Enable debug mode.")}); addOption({QStringLiteral("cmd"), QStringLiteral("Forward all arguments to the cmd client. This argument must be the first.")}); @@ -160,13 +159,6 @@ CommandLineOptions parseOptions(const QStringList &arguments) if (parser.isSet(logDebugOption)) { out.logDebug = true; } - if (parser.isSet(confDirOption)) { - const auto confDir = parser.value(confDirOption); - if (!ConfigFile::setConfDir(confDir)) { - displayHelpText(QStringLiteral("Invalid path passed to --confdir")); - std::exit(1); - } - } if (parser.isSet(debugOption)) { out.logDebug = true; out.debugMode = true; diff --git a/src/libsync/configfile.h b/src/libsync/configfile.h index a17026c11df..9a20250c486 100644 --- a/src/libsync/configfile.h +++ b/src/libsync/configfile.h @@ -150,6 +150,7 @@ class OWNCLOUDSYNC_EXPORT ConfigFile bool moveToTrash() const; void setMoveToTrash(bool); + /// Used for testing, so we do not change the user's config file. static bool setConfDir(const QString &value); bool optionalDesktopNotifications() const;