From d2cd4efaaa75db81f9bb57b4934adb5e48eda8db Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Thu, 16 Mar 2023 20:40:05 +0100 Subject: [PATCH] fix the logic generating the config file Signed-off-by: Matthieu Gallien --- src/gui/application.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/gui/application.cpp b/src/gui/application.cpp index 3b6b797e18..eacccbb57d 100644 --- a/src/gui/application.cpp +++ b/src/gui/application.cpp @@ -332,13 +332,25 @@ Application::Application(int &argc, char **argv) ConfigFile cfg; { + auto shouldExit = false; + // these config values will always be empty after the first client run if (!_overrideServerUrl.isEmpty()) { - cfg.setOverrideServerUrl(_overrideServerUrl); + cfg.setOverrideServerUrl(_overrideServerUrl); + shouldExit = true; } if (!_overrideLocalDir.isEmpty()) { cfg.setOverrideLocalDir(_overrideLocalDir); + shouldExit = true; + } + + if (AccountSetupCommandLineManager::instance()) { + cfg.setVfsEnabled(AccountSetupCommandLineManager::instance()->isVfsEnabled()); + } + + if (shouldExit) { + std::exit(0); } }