diff options
author | drh <drh@noemail.net> | 2011-08-23 20:11:32 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2011-08-23 20:11:32 +0000 |
commit | 1ee6f740462f2ee0529929fcb6513c6c5e01290d (patch) | |
tree | 41c603f4772f933387d3e7295a878f3725928d77 /src/os_unix.c | |
parent | 422faae0ae6d5c934bcb1e247405cc18e824909a (diff) | |
download | sqlite-1ee6f740462f2ee0529929fcb6513c6c5e01290d.tar.gz sqlite-1ee6f740462f2ee0529929fcb6513c6c5e01290d.zip |
If the application-defined openDirectory() function returns SQLITE_CANTOPEN,
then silently ignore the error. This allows the chromium sandbox to disallow
opening of directories without causing errors.
FossilOrigin-Name: 880b51150aaed804005f5062b4dd2fa0ffafa147
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 2f068dc58..a4193c948 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -3350,6 +3350,8 @@ static int unixSync(sqlite3_file *id, int flags){ if( rc==SQLITE_OK && dirfd>=0 ){ full_fsync(dirfd, 0, 0); robust_close(pFile, dirfd, __LINE__); + }else if( rc==SQLITE_CANTOPEN ){ + rc = SQLITE_OK; } pFile->ctrlFlags &= ~UNIXFILE_DIRSYNC; } @@ -5181,6 +5183,8 @@ static int unixDelete( rc = unixLogError(SQLITE_IOERR_DIR_FSYNC, "fsync", zPath); } robust_close(0, fd, __LINE__); + }else if( rc==SQLITE_CANTOPEN ){ + rc = SQLITE_OK; } } #endif |