]> dgit.raspbian.org Git - nextcloud-desktop.git/commitdiff
fix the logic generating the config file
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Thu, 16 Mar 2023 19:40:05 +0000 (20:40 +0100)
committerMatthieu Gallien <matthieu_gallien@yahoo.fr>
Wed, 22 Mar 2023 09:17:28 +0000 (10:17 +0100)
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
src/gui/application.cpp

index 3b6b797e18c3330578d499be94a35f7785be16c6..eacccbb57dbac2ef76f7e1f15c5c647c1122a687 100644 (file)
@@ -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);
         }
     }