| OLD | NEW |
| 1 Index: src/sqliteInt.h | 1 Index: src/sqliteInt.h |
| 2 =================================================================== | 2 =================================================================== |
| 3 --- src/sqliteInt.h (revision 87306) | 3 --- src/sqliteInt.h (revision 87306) |
| 4 +++ src/sqliteInt.h (working copy) | 4 +++ src/sqliteInt.h (working copy) |
| 5 @@ -2522,6 +2522,16 @@ | 5 @@ -2522,6 +2522,16 @@ |
| 6 #endif | 6 #endif |
| 7 | 7 |
| 8 /* | 8 /* |
| 9 +** The CoreServices.h and CoreFoundation.h headers are needed for excluding a | 9 +** The CoreServices.h and CoreFoundation.h headers are needed for excluding a |
| 10 +** -journal file from Time Machine backups when its associated database has | 10 +** -journal file from Time Machine backups when its associated database has |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 @@ -5189,6 +5203,24 @@ | 48 @@ -5189,6 +5203,24 @@ |
| 49 #else | 49 #else |
| 50 rc = sqlite3OsOpen(pVfs, pPager->zJournal, pPager->jfd, flags, 0); | 50 rc = sqlite3OsOpen(pVfs, pPager->zJournal, pPager->jfd, flags, 0); |
| 51 #endif | 51 #endif |
| 52 +#if defined(__APPLE__) | 52 +#if defined(__APPLE__) |
| 53 + /* Set the TimeMachine exclusion metadata for the journal if it has | 53 + /* Set the TimeMachine exclusion metadata for the journal if it has |
| 54 + ** been set for the database. Only do this for unix-type vfs | 54 + ** been set for the database. Only do this for unix-type vfs |
| 55 + ** implementations. */ | 55 + ** implementations. */ |
| 56 + if( rc==SQLITE_OK && pPager->zFilename!=NULL | 56 + if( rc==SQLITE_OK && pPager->zFilename!=NULL |
| 57 + && strlen(pPager->zFilename)>0 | 57 + && strlen(pPager->zFilename)>0 |
| 58 + && memcmp(pVfs->zName, "unix", 4)==0 | 58 + && strncmp(pVfs->zName, "unix", 4)==0 |
| 59 + && ( pVfs->zName[4]=='-' || pVfs->zName[4]=='\0' ) ){ | 59 + && ( pVfs->zName[4]=='-' || pVfs->zName[4]=='\0' ) ){ |
| 60 + CFURLRef database = create_cfurl_from_cstring(pPager->zFilename); | 60 + CFURLRef database = create_cfurl_from_cstring(pPager->zFilename); |
| 61 + if( CSBackupIsItemExcluded(database, NULL) ){ | 61 + if( CSBackupIsItemExcluded(database, NULL) ){ |
| 62 + CFURLRef journal = create_cfurl_from_cstring(pPager->zJournal); | 62 + CFURLRef journal = create_cfurl_from_cstring(pPager->zJournal); |
| 63 + /* Ignore errors from the following exclusion call. */ | 63 + /* Ignore errors from the following exclusion call. */ |
| 64 + CSBackupSetItemExcluded(journal, TRUE, FALSE); | 64 + CSBackupSetItemExcluded(journal, TRUE, FALSE); |
| 65 + CFRelease(journal); | 65 + CFRelease(journal); |
| 66 + } | 66 + } |
| 67 + CFRelease(database); | 67 + CFRelease(database); |
| 68 + } | 68 + } |
| (...skipping 25 matching lines...) Expand all Loading... |
| 94 } | 94 } |
| 95 @@ -162,7 +162,7 @@ | 95 @@ -162,7 +162,7 @@ |
| 96 char x = *z; | 96 char x = *z; |
| 97 if( x==0 ) return 0; | 97 if( x==0 ) return 0; |
| 98 assert( x>='a' && x<='z' ); | 98 assert( x>='a' && x<='z' ); |
| 99 - j = cType[x-'a']; | 99 - j = cType[x-'a']; |
| 100 + j = vOrCType[x-'a']; | 100 + j = vOrCType[x-'a']; |
| 101 if( j<2 ) return 1-j; | 101 if( j<2 ) return 1-j; |
| 102 return isConsonant(z + 1); | 102 return isConsonant(z + 1); |
| 103 } | 103 } |
| OLD | NEW |