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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user