[Pkg-owncloud-commits] [owncloud-client] 151/211: SyncJournalDB: Set WAL files to hidden

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat Oct 25 09:10:39 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 24d4840c93f76055ad658d687afea46def584677
Author: Markus Goetz <markus at woboq.com>
Date:   Tue Oct 21 15:58:56 2014 +0200

    SyncJournalDB: Set WAL files to hidden
---
 csync/src/csync_statedb.c    | 1 -
 src/mirall/syncjournaldb.cpp | 6 ++++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/csync/src/csync_statedb.c b/csync/src/csync_statedb.c
index 0f69f1d..cda6e92 100644
--- a/csync/src/csync_statedb.c
+++ b/csync/src/csync_statedb.c
@@ -168,7 +168,6 @@ static int _csync_statedb_check(const char *statedb) {
   rc = sqlite3_open(statedb, &db);
   if (rc == SQLITE_OK) {
     sqlite3_close(db);
-    csync_win32_set_file_hidden(statedb, true);
     return 1;
   }
   sqlite3_close(db);
diff --git a/src/mirall/syncjournaldb.cpp b/src/mirall/syncjournaldb.cpp
index a36ee6f..71ba1a9 100644
--- a/src/mirall/syncjournaldb.cpp
+++ b/src/mirall/syncjournaldb.cpp
@@ -23,6 +23,7 @@
 #include "syncjournalfilerecord.h"
 #include "utility.h"
 #include "version.h"
+#include "filesystem.h"
 
 #include "../../csync/src/std/c_jhash.h"
 
@@ -155,6 +156,11 @@ bool SyncJournalDb::checkConnect()
         return sqlFail("Set PRAGMA case_sensitivity", pragma1);
     }
 
+    // Hide 'em all!
+    FileSystem::setFileHidden(databaseFilePath(), true);
+    FileSystem::setFileHidden(databaseFilePath() + "-wal", true);
+    FileSystem::setFileHidden(databaseFilePath() + "-shm", true);
+
     /* Because insert are so slow, e do everything in a transaction, and one need to call commit */
     startTransaction();
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list