From 1a5b928bd200a31aa387991fe0aea36fc4e91887 Mon Sep 17 00:00:00 2001 From: Nodir Temirkhodjaev Date: Wed, 8 Jan 2020 18:46:09 +0500 Subject: [PATCH] UI Minor fixes. --- src/ui/fortmanager.cpp | 1 - src/ui/fortsettings.cpp | 4 ++++ src/ui/util/logger.cpp | 1 - 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ui/fortmanager.cpp b/src/ui/fortmanager.cpp index 662a39da..0d96a15a 100644 --- a/src/ui/fortmanager.cpp +++ b/src/ui/fortmanager.cpp @@ -245,7 +245,6 @@ void FortManager::setupAppInfoCache() dbPath = ":memory:"; } else { const QString cachePath = settings()->cachePath(); - FileUtil::makePath(cachePath); dbPath = cachePath + "/appinfocache.db"; } diff --git a/src/ui/fortsettings.cpp b/src/ui/fortsettings.cpp index 113e1a45..1b8019ff 100644 --- a/src/ui/fortsettings.cpp +++ b/src/ui/fortsettings.cpp @@ -147,6 +147,10 @@ void FortSettings::setupIni() FileUtil::makePath(profilePath()); FileUtil::makePath(statPath()); + FileUtil::makePath(logsPath()); + if (!noCache()) { + FileUtil::makePath(cachePath()); + } m_iniExists = FileUtil::fileExists(iniPath); m_ini = new QSettings(iniPath, QSettings::IniFormat, this); diff --git a/src/ui/util/logger.cpp b/src/ui/util/logger.cpp index 9de44cb5..34ade017 100644 --- a/src/ui/util/logger.cpp +++ b/src/ui/util/logger.cpp @@ -65,7 +65,6 @@ void Logger::setConsole(bool console) void Logger::setPath(const QString &path) { m_dir.setPath(path); - m_dir.mkpath("."); } bool Logger::openLogFile()