diff options
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 2d377ef56..3b2b2e2a5 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -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; } |