1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

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
This commit is contained in:
drh
2011-08-23 20:11:32 +00:00
parent 422faae0ae
commit 1ee6f74046
3 changed files with 12 additions and 8 deletions

View File

@@ -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