mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-25 06:25:56 +03:00
Ensure we are making all file modifications under mutex protection
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
711359ef43
commit
1f1d9d6dba
1 changed files with 1 additions and 1 deletions
|
@ -118,12 +118,12 @@ void Logger::doLog(QtMsgType type, const QMessageLogContext &ctx, const QString
|
|||
cout << msg << endl;
|
||||
#endif
|
||||
{
|
||||
QMutexLocker lock(&_mutex);
|
||||
if (_logFile.size() >= MaxLogSizeBytes) {
|
||||
close();
|
||||
enterNextLogFile();
|
||||
}
|
||||
|
||||
QMutexLocker lock(&_mutex);
|
||||
_crashLogIndex = (_crashLogIndex + 1) % CrashLogSize;
|
||||
_crashLog[_crashLogIndex] = msg;
|
||||
|
||||
|
|
Loading…
Reference in a new issue