Index: src/os_unix.c ================================================================== --- src/os_unix.c +++ src/os_unix.c @@ -2393,11 +2393,11 @@ if( isExclusive ) oflags |= (O_EXCL|O_NOFOLLOW); oflags |= (O_LARGEFILE|O_BINARY); memset(pFile, 0, sizeof(unixFile)); fd = open(zPath, oflags, isDelete?0600:SQLITE_DEFAULT_FILE_PERMISSIONS); - if( fd<0 && isReadWrite && !isExclusive ){ + if( fd<0 && errno!=EISDIR && isReadWrite && !isExclusive ){ /* Failed to open the file for read/write access. Try read-only. */ flags &= ~(SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE); flags |= SQLITE_OPEN_READONLY; return unixOpen(pVfs, zPath, pFile, flags, pOutFlags); }