aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index d45fdabab..aa6b3b8e4 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -6185,6 +6185,8 @@ static int unixOpen(
/* If unable to create a journal because the directory is not
** writable, change the error code to indicate that. */
rc = SQLITE_READONLY_DIRECTORY;
+ }else if( errno==EEXIST ){
+ rc = SQLITE_CANTOPEN_EXISTS;
}else if( errno!=EISDIR && isReadWrite ){
/* Failed to open the file for read/write access. Try read-only. */
flags &= ~(SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE);