mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-25 22:46:04 +03:00
Use a standardised locale to create log file filenames, fixing issues with certain locales
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
51bb960418
commit
97301e3a55
1 changed files with 3 additions and 2 deletions
|
@ -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 a new issue