From 4d2821209baecde9b378ed1db2d4d53912be394b Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Fri, 25 Oct 2024 22:45:12 +0800 Subject: [PATCH] Do not alter the user's debug and expiration settings when changing temporary log dir setting Signed-off-by: Claudio Cambra --- src/libsync/logger.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/libsync/logger.cpp b/src/libsync/logger.cpp index 2bfaa8aaf6147..4bf15d2229178 100644 --- a/src/libsync/logger.cpp +++ b/src/libsync/logger.cpp @@ -236,10 +236,9 @@ QString Logger::temporaryFolderLogDirPath() const void Logger::setupTemporaryFolderLogDir() { auto dir = temporaryFolderLogDirPath(); - if (!QDir().mkpath(dir)) + if (!QDir().mkpath(dir)) { return; - setLogDebug(true); - setLogExpire(4 /*hours*/); + } setLogDir(dir); _temporaryFolderLogDir = true; } @@ -251,8 +250,6 @@ void Logger::disableTemporaryFolderLogDir() enterNextLogFile(); setLogDir(QString()); - setLogDebug(false); - setLogFile(QString()); _temporaryFolderLogDir = false; }