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

In the os_unix.c implementation of xOpen(), do not return

SQLITE_READONLY_DIRECTORY in cases where the file cannot be opened for reasons
other than a readonly directory, such as the process running out of file
descriptors.

FossilOrigin-Name: fa8b80bb967792de99808712ac03e37ace0f11eb8fbe444aacd3d19184c425ea
This commit is contained in:
dan
2018-01-09 20:34:53 +00:00
parent c48e0271f6
commit 9898c4a0c4
3 changed files with 10 additions and 8 deletions

View File

@@ -5917,7 +5917,9 @@ static int unixOpen(
rc = unixLogError(SQLITE_CANTOPEN_BKPT, "open", zName);
/* If unable to create a journal, change the error code to
** indicate that the directory permissions are wrong. */
if( isNewJrnl && osAccess(zName, F_OK) ) rc = SQLITE_READONLY_DIRECTORY;
if( isNewJrnl && errno==EACCES && osAccess(zName, F_OK) ){
rc = SQLITE_READONLY_DIRECTORY;
}
goto open_finished;
}