Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKilian Pfeiffer <k.pfeiffer@tum.de>2018-04-17 16:54:05 +0300
committerKilian Pfeiffer <k.pfeiffer@tum.de>2018-04-17 16:54:05 +0300
commitfaf64958ec1f74c3842aa1f37716231057902077 (patch)
treeb1775849ed64a1481a329fa28ab138e61037fbed /src/gui/syncrunfilelog.cpp
parent4c40789dcafe5b193e125620b63dcc95e08ffba5 (diff)
changed paths of logfiles
Diffstat (limited to 'src/gui/syncrunfilelog.cpp')
-rw-r--r--src/gui/syncrunfilelog.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gui/syncrunfilelog.cpp b/src/gui/syncrunfilelog.cpp
index 73f801b5d..9a2b779ca 100644
--- a/src/gui/syncrunfilelog.cpp
+++ b/src/gui/syncrunfilelog.cpp
@@ -95,8 +95,14 @@ void SyncRunFileLog::start(const QString &folderPath)
{
const qint64 logfileMaxSize = 1024 * 1024; // 1MiB
- // Note; this name is ignored in csync_exclude.c
- const QString filename = folderPath + QLatin1String(".owncloudsync.log");
+ const QString foldername = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
+ 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.
QFileInfo info(filename);