diff options
Diffstat (limited to 'third_party/sqlite/mac_time_machine.patch')
-rw-r--r-- | third_party/sqlite/mac_time_machine.patch | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/third_party/sqlite/mac_time_machine.patch b/third_party/sqlite/mac_time_machine.patch index d841c16..905609e 100644 --- a/third_party/sqlite/mac_time_machine.patch +++ b/third_party/sqlite/mac_time_machine.patch @@ -45,15 +45,18 @@ Index: src/pager.c ** This function is called at the start of every write transaction. ** There must already be a RESERVED or EXCLUSIVE lock on the database ** file when this routine is called. -@@ -5189,6 +5203,21 @@ +@@ -5189,6 +5203,24 @@ #else rc = sqlite3OsOpen(pVfs, pPager->zJournal, pPager->jfd, flags, 0); #endif +#if defined(__APPLE__) + /* Set the TimeMachine exclusion metadata for the journal if it has -+ ** been set for the database. */ ++ ** been set for the database. Only do this for unix-type vfs ++ ** implementations. */ + if( rc==SQLITE_OK && pPager->zFilename!=NULL -+ && strlen(pPager->zFilename)>0 ){ ++ && strlen(pPager->zFilename)>0 ++ && memcmp(pVfs->zName, "unix", 4)==0 ++ && ( pVfs->zName[4]=='-' || pVfs->zName[4]=='\0' ) ){ + CFURLRef database = create_cfurl_from_cstring(pPager->zFilename); + if( CSBackupIsItemExcluded(database, NULL) ){ + CFURLRef journal = create_cfurl_from_cstring(pPager->zJournal); |