Skip to content

Commit

Permalink
fix the logic generating the config file
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
  • Loading branch information
mgallien committed Mar 22, 2023
1 parent 85a2020 commit d2cd4ef
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/gui/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit d2cd4ef

Please sign in to comment.