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