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 e582c96 commit 637013b
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 @@ -234,10 +234,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 @@ -249,8 +248,6 @@ void Logger::disableTemporaryFolderLogDir()

enterNextLogFile("nextcloud.log", LogType::Log);
setLogDir(QString());
setLogDebug(false);
setLogFile(QString());
_temporaryFolderLogDir = false;
}

Expand Down

0 comments on commit 637013b

Please sign in to comment.