We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 230aea0 commit d478d17Copy full SHA for d478d17
ext/sqlite/libsqlite/src/os.c
@@ -34,6 +34,9 @@
34
# ifndef O_BINARY
35
# define O_BINARY 0
36
# endif
37
+# ifndef EISDIR
38
+# define EISDIR 21
39
+# endif
40
#endif
41
42
@@ -464,6 +467,9 @@ int sqliteOsOpenReadWrite(
464
467
id->dirfd = -1;
465
468
id->fd = open(zFilename, O_RDWR|O_CREAT|O_LARGEFILE|O_BINARY, 0644);
466
469
if( id->fd<0 ){
470
+ if (errno == EISDIR) {
471
+ return SQLITE_CANTOPEN;
472
+ }
473
id->fd = open(zFilename, O_RDONLY|O_LARGEFILE|O_BINARY);
474
475
return SQLITE_CANTOPEN;
0 commit comments