]> dgit.raspbian.org Git - nextcloud-desktop.git/commitdiff
Rename sync journal to ._sync_xxx.db.
authorChristian Kamm <mail@ckamm.de>
Tue, 22 Nov 2016 12:17:04 +0000 (13:17 +0100)
committerChristian Kamm <mail@ckamm.de>
Wed, 23 Nov 2016 15:48:15 +0000 (16:48 +0100)
The added underscore means that older clients will also ignore the
file.

csync/src/csync_exclude.c
csync/tests/csync_tests/check_csync_exclude.c
doc/architecture.rst
src/gui/folder.cpp
src/gui/folderwatcher_linux.cpp
src/libsync/syncjournaldb.cpp
test/syncenginetestutils.h

index a598893e56c5c0eff20c2998cbe79066697d6a4b..bf636c3de0b7ca24fac75ab85fb09d53646f4417 100644 (file)
@@ -230,7 +230,7 @@ static CSYNC_EXCLUDE_TYPE _csync_excluded_common(c_strlist_t *excludes, const ch
     }
     blen = strlen(bname);
 
-    rc = csync_fnmatch(".sync_*.db*", bname, 0);
+    rc = csync_fnmatch("._sync_*.db*", bname, 0);
     if (rc == 0) {
         match = CSYNC_FILE_SILENTLY_EXCLUDED;
         goto out;
index 5d5d0a82a6ab5814948dd03f1804e4f65ded7f20..e7af73c67fa26b43f46790d2b11f410120c33231 100644 (file)
@@ -149,13 +149,13 @@ static void check_csync_excluded(void **state)
     assert_int_equal(rc, CSYNC_FILE_SILENTLY_EXCLUDED);
     
     /* also the new form of the database name */
-    rc = csync_excluded_no_ctx(csync->excludes, ".sync_5bdd60bdfcfa.db", CSYNC_FTW_TYPE_FILE);
+    rc = csync_excluded_no_ctx(csync->excludes, "._sync_5bdd60bdfcfa.db", CSYNC_FTW_TYPE_FILE);
     assert_int_equal(rc, CSYNC_FILE_SILENTLY_EXCLUDED);
-    rc = csync_excluded_no_ctx(csync->excludes, ".sync_5bdd60bdfcfa.db.ctmp", CSYNC_FTW_TYPE_FILE);
+    rc = csync_excluded_no_ctx(csync->excludes, "._sync_5bdd60bdfcfa.db.ctmp", CSYNC_FTW_TYPE_FILE);
     assert_int_equal(rc, CSYNC_FILE_SILENTLY_EXCLUDED);
-    rc = csync_excluded_no_ctx(csync->excludes, ".sync_5bdd60bdfcfa.db-shm", CSYNC_FTW_TYPE_FILE);
+    rc = csync_excluded_no_ctx(csync->excludes, "._sync_5bdd60bdfcfa.db-shm", CSYNC_FTW_TYPE_FILE);
     assert_int_equal(rc, CSYNC_FILE_SILENTLY_EXCLUDED);
-    rc = csync_excluded_no_ctx(csync->excludes, "subdir/.sync_5bdd60bdfcfa.db", CSYNC_FTW_TYPE_FILE);
+    rc = csync_excluded_no_ctx(csync->excludes, "subdir/._sync_5bdd60bdfcfa.db", CSYNC_FTW_TYPE_FILE);
     assert_int_equal(rc, CSYNC_FILE_SILENTLY_EXCLUDED);
     
 
index cf97302875ca1afa4fcc54f3e9f88c21a6007004..59c7e67a19a97c242d1cd1fbbfc574ca13bdf49e 100644 (file)
@@ -153,7 +153,7 @@ By default, the ownCloud Client ignores the following files:
 
 * Files matched by one of the patterns defined in the Ignored Files Editor
 * Files containing characters that do not work on certain file systems ``(`\, /, :, ?, *, ", >, <, |`)``.
-* Files starting with ``.sync_xxxxxxx.db`` and the old format ``.csync_journal.db``, 
+* Files starting with ``._sync_xxxxxxx.db`` and the old format ``.csync_journal.db``, 
 as these files are reserved for journalling.
 
 If a pattern selected using a checkbox in the `ignoredFilesEditor-label` (or if
index 435ba16db6453c35c2a65812d574183a47d101e4..c6e3b0413ed6c082313badd1f43c20cc0ef1ad9f 100644 (file)
@@ -634,7 +634,7 @@ void Folder::wipe()
     // Delete files that have been partially downloaded.
     slotDiscardDownloadProgress();
 
-    //Unregister the socket API so it does not keep the .sync_journal file open
+    //Unregister the socket API so it does not keep the ._sync_journal file open
     FolderMan::instance()->socketApi()->slotUnregisterPath(alias());
     _journal.close(); // close the sync journal
 
index ed935888e5f12f9ed59fdf7472385a7d402ccbd1..c8024c00b4fc055b8fbda14404c6b852b41222c3 100644 (file)
@@ -169,7 +169,7 @@ void FolderWatcherPrivate::slotReceivedNotification(int fd)
         if (event->len > 0 && event->wd > -1) {
             QByteArray fileName(event->name);
             // qDebug() << Q_FUNC_INFO << event->name;
-            if (fileName.startsWith(".sync_") ||
+            if (fileName.startsWith("._sync_") ||
                     fileName.startsWith(".csync_journal.db") ||
                     fileName.startsWith(".owncloudsync.log")) {
                 // qDebug() << "ignore journal";
index 8193d40ad851b4d040054958e1f7378166fd629e..1e7adbbb60ba6e069f5e98678477221ba14403ae 100644 (file)
@@ -48,7 +48,7 @@ void SyncJournalDb::setAccountParameterForFilePath( const QString& localPath, co
 {
     // localPath always has a trailing slash
     _dbFile = localPath;
-    _dbFile.append( QLatin1String(".sync_"));
+    _dbFile.append( QLatin1String("._sync_"));
     // FIXME: Maybe it is better to only allow different hosts, without path component.
     QString remoteUrlPath = remoteUrl.toString();
     if( remotePath != QLatin1String("/") ) {
index 651c34f2523316791255bc4dfb0fb8d024fccd8a..b68f84397477cde9a7c4a815dffc2d966dadeb3e 100644 (file)
@@ -738,7 +738,7 @@ public:
         _account->setCredentials(new FakeCredentials{_fakeQnam});
 
         _journalDb.reset(new OCC::SyncJournalDb());
-        _journalDb->setDatabaseFilePath(localPath() + ".sync_test.db");
+        _journalDb->setDatabaseFilePath(localPath() + "._sync_test.db");
         _syncEngine.reset(new OCC::SyncEngine(_account, localPath(), "", _journalDb.get()));
 
         // A new folder will update the local file state database on first sync.