mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 23:28:14 +03:00
changed paths of logfiles
This commit is contained in:
parent
4c40789dca
commit
faf64958ec
2 changed files with 10 additions and 2 deletions
|
@ -95,8 +95,14 @@ void SyncRunFileLog::start(const QString &folderPath)
|
||||||
{
|
{
|
||||||
const qint64 logfileMaxSize = 1024 * 1024; // 1MiB
|
const qint64 logfileMaxSize = 1024 * 1024; // 1MiB
|
||||||
|
|
||||||
// Note; this name is ignored in csync_exclude.c
|
const QString foldername = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
|
||||||
const QString filename = folderPath + QLatin1String(".owncloudsync.log");
|
if(!QDir(foldername).exists()) {
|
||||||
|
QDir().mkdir(foldername);
|
||||||
|
}
|
||||||
|
|
||||||
|
int length = folderPath.split(QString(QDir::separator())).length();
|
||||||
|
const QString filename = foldername + QString(QDir::separator()) ///
|
||||||
|
+"." + folderPath.split(QString(QDir::separator())).at(length - 2) + QLatin1String("_sync.log");
|
||||||
|
|
||||||
// When the file is too big, just rename it to an old name.
|
// When the file is too big, just rename it to an old name.
|
||||||
QFileInfo info(filename);
|
QFileInfo info(filename);
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
#include <QTextStream>
|
#include <QTextStream>
|
||||||
#include <QScopedPointer>
|
#include <QScopedPointer>
|
||||||
#include <QElapsedTimer>
|
#include <QElapsedTimer>
|
||||||
|
#include <QStandardPaths>
|
||||||
|
#include <QDir>
|
||||||
|
|
||||||
#include "syncfileitem.h"
|
#include "syncfileitem.h"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue