From 903c475d5ab0f0c845f3857e5712d3532aa50fa4 Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Thu, 16 Mar 2023 20:23:56 +0100 Subject: [PATCH 1/3] store in config file that we want to enable vfs when generating config Signed-off-by: Matthieu Gallien --- src/gui/accountsetupcommandlinemanager.cpp | 5 +++++ src/gui/accountsetupcommandlinemanager.h | 2 ++ src/gui/owncloudsetupwizard.cpp | 2 ++ src/libsync/configfile.cpp | 13 +++++++++++++ src/libsync/configfile.h | 3 +++ src/libsync/theme.cpp | 13 +++++++++++++ src/libsync/theme.h | 6 ++++++ 7 files changed, 44 insertions(+) diff --git a/src/gui/accountsetupcommandlinemanager.cpp b/src/gui/accountsetupcommandlinemanager.cpp index a604cb53bc199..94388b7ea5f17 100644 --- a/src/gui/accountsetupcommandlinemanager.cpp +++ b/src/gui/accountsetupcommandlinemanager.cpp @@ -95,6 +95,11 @@ bool AccountSetupCommandLineManager::isCommandLineParsed() const return !_appPassword.isEmpty() && !_userId.isEmpty() && _serverUrl.isValid(); } +bool AccountSetupCommandLineManager::isVfsEnabled() const +{ + return _isVfsEnabled; +} + void AccountSetupCommandLineManager::setupAccountFromCommandLine() { if (isCommandLineParsed()) { diff --git a/src/gui/accountsetupcommandlinemanager.h b/src/gui/accountsetupcommandlinemanager.h index 156ab5d9002ab..70b8bf6cf0a8e 100644 --- a/src/gui/accountsetupcommandlinemanager.h +++ b/src/gui/accountsetupcommandlinemanager.h @@ -32,6 +32,8 @@ class AccountSetupCommandLineManager : public QObject [[nodiscard]] bool isCommandLineParsed() const; + [[nodiscard]] bool isVfsEnabled() const; + public slots: void setupAccountFromCommandLine(); diff --git a/src/gui/owncloudsetupwizard.cpp b/src/gui/owncloudsetupwizard.cpp index 27f7d6c9f046b..551fc487dc727 100644 --- a/src/gui/owncloudsetupwizard.cpp +++ b/src/gui/owncloudsetupwizard.cpp @@ -73,6 +73,8 @@ void OwncloudSetupWizard::runWizard(QObject *obj, const char *amember, QWidget * if (!cfg.overrideServerUrl().isEmpty()) { Theme::instance()->setOverrideServerUrl(cfg.overrideServerUrl()); Theme::instance()->setForceOverrideServerUrl(true); + Theme::instance()->setVfsEnabled(cfg.isVfsEnabled()); + Theme::instance()->setStartLoginFlowAutomatically(true); } if (!wiz.isNull()) { diff --git a/src/libsync/configfile.cpp b/src/libsync/configfile.cpp index c2c2cbca03fde..f60a4b19bc20d 100644 --- a/src/libsync/configfile.cpp +++ b/src/libsync/configfile.cpp @@ -70,6 +70,7 @@ static constexpr char updateSegmentC[] = "updateSegment"; static constexpr char updateChannelC[] = "updateChannel"; static constexpr char overrideServerUrlC[] = "overrideServerUrl"; static constexpr char overrideLocalDirC[] = "overrideLocalDir"; +static constexpr char isVfsEnabledC[] = "isVfsEnabled"; static constexpr char geometryC[] = "geometry"; static constexpr char timeoutC[] = "timeout"; static constexpr char chunkSizeC[] = "chunkSize"; @@ -724,6 +725,18 @@ void ConfigFile::setOverrideLocalDir(const QString &localDir) settings.setValue(QLatin1String(overrideLocalDirC), localDir); } +bool ConfigFile::isVfsEnabled() const +{ + QSettings settings(configFile(), QSettings::IniFormat); + return settings.value({isVfsEnabledC}, {}).toBool(); +} + +void ConfigFile::setVfsEnabled(bool enabled) +{ + QSettings settings(configFile(), QSettings::IniFormat); + settings.setValue({isVfsEnabledC}, enabled); +} + void ConfigFile::setProxyType(int proxyType, const QString &host, int port, bool needsAuth, diff --git a/src/libsync/configfile.h b/src/libsync/configfile.h index 9284d4ea25132..9f0f76155b067 100644 --- a/src/libsync/configfile.h +++ b/src/libsync/configfile.h @@ -196,6 +196,9 @@ class OWNCLOUDSYNC_EXPORT ConfigFile [[nodiscard]] QString overrideLocalDir() const; void setOverrideLocalDir(const QString &localDir); + [[nodiscard]] bool isVfsEnabled() const; + void setVfsEnabled(bool enabled); + void saveGeometryHeader(QHeaderView *header); void restoreGeometryHeader(QHeaderView *header); diff --git a/src/libsync/theme.cpp b/src/libsync/theme.cpp index 7336c329e5994..a8bcd127365b0 100644 --- a/src/libsync/theme.cpp +++ b/src/libsync/theme.cpp @@ -426,6 +426,11 @@ bool Theme::forceOverrideServerUrl() const return _forceOverrideServerUrl; } +bool Theme::isVfsEnabled() const +{ + return _isVfsEnabled; +} + bool Theme::startLoginFlowAutomatically() const { return _startLoginFlowAutomatically; @@ -971,6 +976,14 @@ void Theme::setForceOverrideServerUrl(bool forceOverride) } } +void Theme::setVfsEnabled(bool enabled) +{ + if (_isVfsEnabled != enabled) { + _isVfsEnabled = enabled; + emit vfsEnabledChanged(); + } +} + void Theme::setStartLoginFlowAutomatically(bool startLoginFlowAuto) { if (_startLoginFlowAutomatically != startLoginFlowAuto) { diff --git a/src/libsync/theme.h b/src/libsync/theme.h index de721f71c273a..5c805fd8f14b7 100644 --- a/src/libsync/theme.h +++ b/src/libsync/theme.h @@ -57,6 +57,7 @@ class OWNCLOUDSYNC_EXPORT Theme : public QObject Q_PROPERTY(QString conflictHelpUrl READ conflictHelpUrl CONSTANT) Q_PROPERTY(QString overrideServerUrl READ overrideServerUrl WRITE setOverrideServerUrl NOTIFY overrideServerUrlChanged) Q_PROPERTY(bool forceOverrideServerUrl READ forceOverrideServerUrl WRITE setForceOverrideServerUrl NOTIFY forceOverrideServerUrlChanged) + Q_PROPERTY(bool isVfsEnabled READ isVfsEnabled WRITE setVfsEnabled NOTIFY vfsEnabledChanged) Q_PROPERTY(bool startLoginFlowAutomatically READ startLoginFlowAutomatically WRITE setStartLoginFlowAutomatically NOTIFY startLoginFlowAutomaticallyChanged) #ifndef TOKEN_AUTH_ONLY Q_PROPERTY(QColor wizardHeaderTitleColor READ wizardHeaderTitleColor CONSTANT) @@ -243,6 +244,8 @@ class OWNCLOUDSYNC_EXPORT Theme : public QObject */ virtual bool forceOverrideServerUrl() const; + virtual bool isVfsEnabled() const; + /** * Automatically start login flow * @@ -595,6 +598,7 @@ class OWNCLOUDSYNC_EXPORT Theme : public QObject public slots: virtual void setOverrideServerUrl(const QString &overrideServerUrl); virtual void setForceOverrideServerUrl(bool forceOverride); + virtual void setVfsEnabled(bool enabled); virtual void setStartLoginFlowAutomatically(bool startLoginFlowAuto); protected: @@ -617,6 +621,7 @@ public slots: void darkModeChanged(); void overrideServerUrlChanged(); void forceOverrideServerUrlChanged(); + void vfsEnabledChanged(); void startLoginFlowAutomaticallyChanged(); private: @@ -634,6 +639,7 @@ public slots: QString _overrideServerUrl; bool _forceOverrideServerUrl = false; + bool _isVfsEnabled = false; bool _startLoginFlowAutomatically = false; #ifndef TOKEN_AUTH_ONLY From 85a202098268f633f159033fcc838e1bd23cf945 Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Thu, 16 Mar 2023 20:39:39 +0100 Subject: [PATCH 2/3] tidy up code in Theme class Signed-off-by: Matthieu Gallien --- src/libsync/nextcloudtheme.h | 2 +- src/libsync/theme.h | 149 ++++++++++++++++++----------------- 2 files changed, 77 insertions(+), 74 deletions(-) diff --git a/src/libsync/nextcloudtheme.h b/src/libsync/nextcloudtheme.h index f7c215b8f784a..6ad138615a2d7 100644 --- a/src/libsync/nextcloudtheme.h +++ b/src/libsync/nextcloudtheme.h @@ -29,7 +29,7 @@ class NextcloudTheme : public Theme public: NextcloudTheme(); - QString wizardUrlHint() const override; + [[nodiscard]] QString wizardUrlHint() const override; }; } #endif // NEXTCLOUD_THEME_H diff --git a/src/libsync/theme.h b/src/libsync/theme.h index 5c805fd8f14b7..a936ebc93ac22 100644 --- a/src/libsync/theme.h +++ b/src/libsync/theme.h @@ -90,7 +90,7 @@ class OWNCLOUDSYNC_EXPORT Theme : public QObject * * @return true if branded, false otherwise */ - virtual bool isBranded() const; + [[nodiscard]] bool isBranded() const; /** * @brief appNameGUI - Human readable application name. @@ -103,7 +103,7 @@ class OWNCLOUDSYNC_EXPORT Theme : public QObject * * @return QString with human readable app name. */ - virtual QString appNameGUI() const; + [[nodiscard]] QString appNameGUI() const; /** * @brief appName - Application name (short) @@ -121,61 +121,61 @@ class OWNCLOUDSYNC_EXPORT Theme : public QObject * * @return QString with app name. */ - virtual QString appName() const; + [[nodiscard]] QString appName() const; /** * @brief Returns full path to an online state icon * @return QUrl full path to an icon */ - QUrl stateOnlineImageSource() const; + [[nodiscard]] QUrl stateOnlineImageSource() const; /** * @brief Returns full path to an offline state icon * @return QUrl full path to an icon */ - QUrl stateOfflineImageSource() const; + [[nodiscard]] QUrl stateOfflineImageSource() const; /** * @brief Returns full path to an online user status icon * @return QUrl full path to an icon */ - QUrl statusOnlineImageSource() const; + [[nodiscard]] QUrl statusOnlineImageSource() const; /** * @brief Returns full path to an do not disturb user status icon * @return QUrl full path to an icon */ - QUrl statusDoNotDisturbImageSource() const; + [[nodiscard]] QUrl statusDoNotDisturbImageSource() const; /** * @brief Returns full path to an away user status icon * @return QUrl full path to an icon */ - QUrl statusAwayImageSource() const; + [[nodiscard]] QUrl statusAwayImageSource() const; /** * @brief Returns full path to an invisible user status icon * @return QUrl full path to an icon */ - QUrl statusInvisibleImageSource() const; + [[nodiscard]] QUrl statusInvisibleImageSource() const; - QUrl syncStatusOk() const; + [[nodiscard]] QUrl syncStatusOk() const; - QUrl syncStatusError() const; + [[nodiscard]] QUrl syncStatusError() const; - QUrl syncStatusRunning() const; + [[nodiscard]] QUrl syncStatusRunning() const; - QUrl syncStatusPause() const; + [[nodiscard]] QUrl syncStatusPause() const; - QUrl syncStatusWarning() const; + [[nodiscard]] QUrl syncStatusWarning() const; - QUrl folderOffline() const; + [[nodiscard]] QUrl folderOffline() const; /** * @brief configFileName * @return the name of the config file. */ - virtual QString configFileName() const; + [[nodiscard]] QString configFileName() const; #ifndef TOKEN_AUTH_ONLY static QString hidpiFileName(const QString &fileName, QPaintDevice *dev = nullptr); @@ -187,25 +187,25 @@ class OWNCLOUDSYNC_EXPORT Theme : public QObject /** * get an sync state icon */ - virtual QIcon syncStateIcon(SyncResult::Status, bool sysTray = false) const; + [[nodiscard]] QIcon syncStateIcon(SyncResult::Status, bool sysTray = false) const; - virtual QIcon folderDisabledIcon() const; - virtual QIcon folderOfflineIcon(bool sysTray = false) const; - virtual QIcon applicationIcon() const; + [[nodiscard]] QIcon folderDisabledIcon() const; + [[nodiscard]] QIcon folderOfflineIcon(bool sysTray = false) const; + [[nodiscard]] QIcon applicationIcon() const; #endif - virtual QString statusHeaderText(SyncResult::Status) const; - virtual QString version() const; + [[nodiscard]] QString statusHeaderText(SyncResult::Status) const; + [[nodiscard]] QString version() const; /** * Characteristics: bool if more than one sync folder is allowed */ - virtual bool singleSyncFolder() const; + [[nodiscard]] bool singleSyncFolder() const; /** * When true, client works with multiple accounts. */ - virtual bool multiAccount() const; + [[nodiscard]] bool multiAccount() const; /** * URL to documentation. @@ -217,7 +217,7 @@ class OWNCLOUDSYNC_EXPORT Theme : public QObject * * Defaults to Nextclouds client documentation website. */ - virtual QString helpUrl() const; + [[nodiscard]] QString helpUrl() const; /** * The url to use for showing help on conflicts. @@ -228,76 +228,79 @@ class OWNCLOUDSYNC_EXPORT Theme : public QObject * documentation website. If helpUrl() is empty, this function will also return the * empty string. */ - virtual QString conflictHelpUrl() const; + [[nodiscard]] QString conflictHelpUrl() const; /** * Setting a value here will pre-define the server url. * * The respective UI controls will be disabled only if forceOverrideServerUrl() is true */ - virtual QString overrideServerUrl() const; + [[nodiscard]] QString overrideServerUrl() const; /** * Enforce a pre-defined server url. * * When true, the respective UI controls will be disabled */ - virtual bool forceOverrideServerUrl() const; + [[nodiscard]] bool forceOverrideServerUrl() const; - virtual bool isVfsEnabled() const; + /** + * Enforce use of virtual files whenever possible. + */ + [[nodiscard]] bool isVfsEnabled() const; /** * Automatically start login flow * * When true, the browser will get opened automatically */ - virtual bool startLoginFlowAutomatically() const; + [[nodiscard]] bool startLoginFlowAutomatically() const; /** * Enable OCSP stapling for SSL handshakes * * When true, peer will be requested for Online Certificate Status Protocol response */ - virtual bool enableStaplingOCSP() const; + [[nodiscard]] bool enableStaplingOCSP() const; /** * Enforce SSL validity * * When true, trusting the untrusted certificate is not allowed */ - virtual bool forbidBadSSL() const; + [[nodiscard]] bool forbidBadSSL() const; /** * Forbid use of proxy * * When true, the app always connects to the server directly */ - virtual bool doNotUseProxy() const; + [[nodiscard]] bool doNotUseProxy() const; /** * This is only usefull when previous version had a different overrideServerUrl * with a different auth type in that case You should then specify "http" or "shibboleth". * Normaly this should be left empty. */ - virtual QString forceConfigAuthType() const; + [[nodiscard]] QString forceConfigAuthType() const; /** * The default folder name without path on the server at setup time. */ - virtual QString defaultServerFolder() const; + [[nodiscard]] QString defaultServerFolder() const; /** * The default folder name without path on the client side at setup time. */ - virtual QString defaultClientFolder() const; + [[nodiscard]] QString defaultClientFolder() const; /** * Override to encforce a particular locale, i.e. "de" or "pt_BR" */ - virtual QString enforcedLocale() const { return QString(); } + [[nodiscard]] QString enforcedLocale() const { return QString(); } /** colored, white or black */ - QString systrayIconFlavor(bool mono) const; + [[nodiscard]] QString systrayIconFlavor(bool mono) const; #ifndef TOKEN_AUTH_ONLY /** @@ -305,18 +308,18 @@ class OWNCLOUDSYNC_EXPORT Theme : public QObject * The default implementation will try to look up * :/client/theme/.png */ - virtual QVariant customMedia(CustomMediaType type); + [[nodiscard]] QVariant customMedia(CustomMediaType type); /** @return color for the setup wizard */ - virtual QColor wizardHeaderTitleColor() const; + [[nodiscard]] QColor wizardHeaderTitleColor() const; /** @return color for the setup wizard. */ - virtual QColor wizardHeaderBackgroundColor() const; + [[nodiscard]] QColor wizardHeaderBackgroundColor() const; - virtual QPixmap wizardApplicationLogo() const; + [[nodiscard]] QPixmap wizardApplicationLogo() const; /** @return logo for the setup wizard. */ - virtual QPixmap wizardHeaderLogo() const; + [[nodiscard]] QPixmap wizardHeaderLogo() const; /** * The default implementation creates a @@ -325,23 +328,23 @@ class OWNCLOUDSYNC_EXPORT Theme : public QObject * * @return banner for the setup wizard. */ - virtual QPixmap wizardHeaderBanner() const; + [[nodiscard]] QPixmap wizardHeaderBanner() const; #endif /** * The SHA sum of the released git commit */ - QString gitSHA1() const; + [[nodiscard]] QString gitSHA1() const; /** * About dialog contents */ - virtual QString about() const; + [[nodiscard]] QString about() const; /** * Legal notice dialog version detail contents */ - virtual QString aboutDetails() const; + [[nodiscard]] QString aboutDetails() const; /** * Define if the systray icons should be using mono design @@ -351,56 +354,56 @@ class OWNCLOUDSYNC_EXPORT Theme : public QObject /** * Retrieve wether to use mono icons for systray */ - bool systrayUseMonoIcons() const; + [[nodiscard]] bool systrayUseMonoIcons() const; /** * Check if mono icons are available */ - bool monoIconsAvailable() const; + [[nodiscard]] bool monoIconsAvailable() const; /** * @brief Where to check for new Updates. */ - virtual QString updateCheckUrl() const; + [[nodiscard]] QString updateCheckUrl() const; /** * When true, the setup wizard will show the selective sync dialog by default and default * to nothing selected */ - virtual bool wizardSelectiveSyncDefaultNothing() const; + [[nodiscard]] bool wizardSelectiveSyncDefaultNothing() const; /** * Default option for the newBigFolderSizeLimit. * Size in MB of the maximum size of folder before we ask the confirmation. * Set -1 to never ask confirmation. 0 to ask confirmation for every folder. **/ - virtual qint64 newBigFolderSizeLimit() const; + [[nodiscard]] qint64 newBigFolderSizeLimit() const; /** * Hide the checkbox that says "Ask for confirmation before synchronizing folders larger than X MB" * in the account wizard */ - virtual bool wizardHideFolderSizeLimitCheckbox() const; + [[nodiscard]] bool wizardHideFolderSizeLimitCheckbox() const; /** * Hide the checkbox that says "Ask for confirmation before synchronizing external storages" * in the account wizard */ - virtual bool wizardHideExternalStorageConfirmationCheckbox() const; + [[nodiscard]] bool wizardHideExternalStorageConfirmationCheckbox() const; /** * @brief Sharing options * * Allow link sharing and or user/group sharing */ - virtual bool linkSharing() const; - virtual bool userGroupSharing() const; + [[nodiscard]] bool linkSharing() const; + [[nodiscard]] bool userGroupSharing() const; /** * If this returns true, the user cannot configure the proxy in the network settings. * The proxy settings will be disabled in the configuration dialog. * Default returns false. */ - virtual bool forceSystemNetworkProxy() const; + [[nodiscard]] bool forceSystemNetworkProxy() const; /** * @brief How to handle the userID @@ -417,7 +420,7 @@ class OWNCLOUDSYNC_EXPORT Theme : public QObject * * @return UserIDType::UserIDUserName, unless reimplemented */ - virtual UserIDType userIDType() const; + [[nodiscard]] UserIDType userIDType() const; /** * @brief Allows to customize the type of user ID (e.g. user name, email) @@ -427,7 +430,7 @@ class OWNCLOUDSYNC_EXPORT Theme : public QObject * * @return An empty string, unless reimplemented */ - virtual QString customUserID() const; + [[nodiscard]] QString customUserID() const; /** * @brief Demo string to be displayed when no text has been @@ -435,7 +438,7 @@ class OWNCLOUDSYNC_EXPORT Theme : public QObject * * @return An empty string, unless reimplemented */ - virtual QString userIDHint() const; + [[nodiscard]] QString userIDHint() const; /** * @brief Postfix that will be enforced in a URL. e.g. @@ -443,14 +446,14 @@ class OWNCLOUDSYNC_EXPORT Theme : public QObject * * @return An empty string, unless reimplemented */ - virtual QString wizardUrlPostfix() const; + [[nodiscard]] QString wizardUrlPostfix() const; /** * @brief String that will be shown as long as no text has been entered by the user. * * @return An empty string, unless reimplemented */ - virtual QString wizardUrlHint() const; + [[nodiscard]] virtual QString wizardUrlHint() const; /** * @brief the server folder that should be queried for the quota information @@ -461,14 +464,14 @@ class OWNCLOUDSYNC_EXPORT Theme : public QObject * * Defaults: "/" */ - virtual QString quotaBaseFolder() const; + [[nodiscard]] QString quotaBaseFolder() const; /** * The OAuth client_id, secret pair. * Note that client that change these value cannot connect to un-branded owncloud servers. */ - virtual QString oauthClientId() const; - virtual QString oauthClientSecret() const; + [[nodiscard]] QString oauthClientId() const; + [[nodiscard]] QString oauthClientSecret() const; /** * @brief What should be output for the --version command line switch. @@ -476,7 +479,7 @@ class OWNCLOUDSYNC_EXPORT Theme : public QObject * By default, it's a combination of appName(), version(), the GIT SHA1 and some * important dependency versions. */ - virtual QString versionSwitchOutput() const; + [[nodiscard]] QString versionSwitchOutput() const; /** * @brief Request suitable QIcon resource depending on the background colour of the parent widget. @@ -484,7 +487,7 @@ class OWNCLOUDSYNC_EXPORT Theme : public QObject * This should be replaced (TODO) by a real theming implementation for the client UI * (actually 2019/09/13 only systray theming). */ - virtual QIcon uiThemeIcon(const QString &iconName, bool uiHasDarkBg) const; + [[nodiscard]] QIcon uiThemeIcon(const QString &iconName, bool uiHasDarkBg) const; Q_INVOKABLE static double getColorDarkness(const QColor &color); @@ -584,9 +587,9 @@ class OWNCLOUDSYNC_EXPORT Theme : public QObject * By default, the options are not shown unless experimental options are * manually enabled in the configuration file. */ - virtual bool showVirtualFilesOption() const; + [[nodiscard]] bool showVirtualFilesOption() const; - virtual bool enforceVirtualFilesSyncFolder() const; + [[nodiscard]] bool enforceVirtualFilesSyncFolder() const; static QColor defaultColor(); @@ -596,10 +599,10 @@ class OWNCLOUDSYNC_EXPORT Theme : public QObject bool darkMode(); public slots: - virtual void setOverrideServerUrl(const QString &overrideServerUrl); - virtual void setForceOverrideServerUrl(bool forceOverride); - virtual void setVfsEnabled(bool enabled); - virtual void setStartLoginFlowAutomatically(bool startLoginFlowAuto); + void setOverrideServerUrl(const QString &overrideServerUrl); + void setForceOverrideServerUrl(bool forceOverride); + void setVfsEnabled(bool enabled); + void setStartLoginFlowAutomatically(bool startLoginFlowAuto); protected: #ifndef TOKEN_AUTH_ONLY From d2cd4efaaa75db81f9bb57b4934adb5e48eda8db Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Thu, 16 Mar 2023 20:40:05 +0100 Subject: [PATCH 3/3] 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 3b6b797e18c33..eacccbb57dbac 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); } }