csync db files: Hide after some commit/transactions. #2461

The shm and wal files are only created later.
This commit is contained in:
Christian Kamm 2014-11-20 12:30:04 +01:00
parent 06b31d7cf0
commit 9dc57359b9

View file

@ -158,11 +158,6 @@ bool SyncJournalDb::checkConnect()
return sqlFail("Set PRAGMA case_sensitivity", pragma1); 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 */ /* Because insert are so slow, e do everything in a transaction, and one need to call commit */
startTransaction(); startTransaction();
@ -335,6 +330,11 @@ bool SyncJournalDb::checkConnect()
// don't start a new transaction now // don't start a new transaction now
commitInternal(QString("checkConnect End"), false); commitInternal(QString("checkConnect End"), false);
// Hide 'em all!
FileSystem::setFileHidden(databaseFilePath(), true);
FileSystem::setFileHidden(databaseFilePath() + "-wal", true);
FileSystem::setFileHidden(databaseFilePath() + "-shm", true);
return rc; return rc;
} }