Skip to content

Commit

Permalink
Do not alter the user's debug and expiration settings when changing t…
Browse files Browse the repository at this point in the history
…emporary log dir setting

Signed-off-by: Claudio Cambra <[email protected]>
  • Loading branch information
claucambra authored and backportbot[bot] committed Oct 31, 2024
1 parent 03d9f9f commit 927b67f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/libsync/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -251,8 +250,6 @@ void Logger::disableTemporaryFolderLogDir()

enterNextLogFile();
setLogDir(QString());
setLogDebug(false);
setLogFile(QString());
_temporaryFolderLogDir = false;
}

Expand Down

0 comments on commit 927b67f

Please sign in to comment.