diff --git a/src/gui/syncrunfilelog.cpp b/src/gui/syncrunfilelog.cpp index 5610fb6a02ff7..d453b6ca2e9c8 100644 --- a/src/gui/syncrunfilelog.cpp +++ b/src/gui/syncrunfilelog.cpp @@ -15,7 +15,7 @@ #include #include "syncrunfilelog.h" -#include "common/utility.h" +#include "libsync/configfile.h" #include "filesystem.h" #include @@ -32,7 +32,7 @@ void SyncRunFileLog::start(const QString &folderPath) { const qint64 logfileMaxSize = 10 * 1024 * 1024; // 10MiB - const QString logpath = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation); + const QString logpath = ConfigFile().logDir(); if(!QDir(logpath).exists()) { QDir().mkdir(logpath); } diff --git a/src/libsync/configfile.cpp b/src/libsync/configfile.cpp index 2b1cda432e597..437ab16d056f6 100644 --- a/src/libsync/configfile.cpp +++ b/src/libsync/configfile.cpp @@ -1113,7 +1113,10 @@ void ConfigFile::setAutomaticLogDir(bool enabled) QString ConfigFile::logDir() const { - const auto defaultLogDir = QString(configPath() + QStringLiteral("/logs")); + const auto defaultLogDir = QString( + QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + + QStringLiteral("/logs") + ); QSettings settings(configFile(), QSettings::IniFormat); return settings.value(QLatin1String(logDirC), defaultLogDir).toString(); }