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 committed Oct 31, 2024
1 parent eb50768 commit b39f4aa
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 b39f4aa

Please sign in to comment.