From b864bef2e8986a60b4949bdeabcd725bbcd26c84 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Fri, 5 May 2023 10:44:49 +0800 Subject: [PATCH] Add application argument to force import of legacy accounts Signed-off-by: Claudio Cambra --- src/gui/application.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gui/application.cpp b/src/gui/application.cpp index 8eca93d50..bb70d685f 100644 --- a/src/gui/application.cpp +++ b/src/gui/application.cpp @@ -97,7 +97,8 @@ namespace { " --localdirpath : (optional) path where to create a local sync folder when creating an account via command-line.\n" " --isvfsenabled : whether to set a VFS or non-VFS folder (1 for 'yes' or 0 for 'no') when creating an account via command-line.\n" " --remotedirpath : (optional) path to a remote subfolder when creating an account via command-line.\n" - " --serverurl : a server URL to use when creating an account via command-line.\n"; + " --serverurl : a server URL to use when creating an account via command-line.\n" + " --forcelegacyimport : forcefully import account configurations from legacy clients (if available).\n"; QString applicationTrPath() { @@ -755,8 +756,9 @@ void Application::parseOptions(const QStringList &options) } else { showHint("Invalid URL passed to --overridelocaldir"); } - } - else { + } else if (option == QStringLiteral("--forcelegacyimport")) { + AccountManager::instance()->setForceLegacyImport(true); + } else { QString errorMessage; if (!AccountSetupCommandLineManager::instance()->parseCommandlineOption(option, it, errorMessage)) { if (!errorMessage.isEmpty()) { -- 2.30.2