From 6773991e4f162a2fcae92b9a601a334cb00cdf97 Mon Sep 17 00:00:00 2001 From: Nodir Temirkhodjaev Date: Sun, 16 May 2021 19:07:55 +0300 Subject: [PATCH] UI: FortSettings: Simplify setupPaths(). --- src/ui/fortsettings.cpp | 6 +++++- src/ui/fortsettings.h | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ui/fortsettings.cpp b/src/ui/fortsettings.cpp index ec81f656..5fdba316 100644 --- a/src/ui/fortsettings.cpp +++ b/src/ui/fortsettings.cpp @@ -116,7 +116,9 @@ void FortSettings::setupGlobal() void FortSettings::initialize(const QStringList &args, EnvManager *envManager) { processArguments(args); + setupPaths(envManager); + createPaths(); setupIni(profilePath() + APP_BASE + ".ini"); @@ -251,8 +253,10 @@ void FortSettings::setupPaths(EnvManager *envManager) } else { m_userPath = expandPath(m_userPath, envManager); } +} - // Create directories +void FortSettings::createPaths() +{ FileUtil::makePath(profilePath()); FileUtil::makePath(statPath()); FileUtil::makePath(logsPath()); diff --git a/src/ui/fortsettings.h b/src/ui/fortsettings.h index 5d7af67e..4545e427 100644 --- a/src/ui/fortsettings.h +++ b/src/ui/fortsettings.h @@ -80,7 +80,9 @@ protected: private: void processArguments(const QStringList &args); + void setupPaths(EnvManager *envManager); + void createPaths(); private: uint m_isDefaultProfilePath : 1;