From 07cbeb09246697d4fff07ab2f63f84c220d58d92 Mon Sep 17 00:00:00 2001 From: Nodir Temirkhodjaev Date: Sun, 16 May 2021 17:47:14 +0300 Subject: [PATCH] UI: Improve previous commit. --- src/ui/fortsettings.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ui/fortsettings.cpp b/src/ui/fortsettings.cpp index 9d08c9e9..ec81f656 100644 --- a/src/ui/fortsettings.cpp +++ b/src/ui/fortsettings.cpp @@ -267,8 +267,9 @@ void FortSettings::setupPaths(EnvManager *envManager) // Copy .ini to .user.ini // TODO: COMPAT: Remove after v4.1.0 (via v4.0.0) - if (profilePath() != userPath()) { - FileUtil::copyFile(profilePath() + APP_BASE + ".ini", userPath() + APP_BASE + ".user.ini"); + const QString iniUserPath = userPath() + APP_BASE + ".user.ini"; + if (!isService() && !FileUtil::fileExists(iniUserPath)) { + FileUtil::copyFile(profilePath() + APP_BASE + ".ini", iniUserPath); } }