mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Merge pull request #6012 from nextcloud/bugfix/fix-log-file-creation
Use a standardised locale to create log file filenames
This commit is contained in:
commit
e2bd6e506f
@ -289,8 +289,9 @@ void Logger::enterNextLogFileNoLock()
|
||||
}
|
||||
|
||||
// Tentative new log name, will be adjusted if one like this already exists
|
||||
QDateTime now = QDateTime::currentDateTime();
|
||||
QString newLogName = now.toString("yyyyMMdd_HHmm") + "_nextcloud.log";
|
||||
const auto now = QDateTime::currentDateTime();
|
||||
const auto cLocale = QLocale::c(); // Some system locales generate strings that are incompatible with filesystem
|
||||
QString newLogName = cLocale.toString(now, QStringLiteral("yyyyMMdd_HHmm")) + QStringLiteral("_nextcloud.log");
|
||||
|
||||
// Expire old log files and deal with conflicts
|
||||
QStringList files = dir.entryList(QStringList("*owncloud.log.*"), QDir::Files, QDir::Name) +
|
||||
|
||||
Loading…
Reference in New Issue
Block a user