diff options
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 18f2afcb6..e6d58811c 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -6259,7 +6259,8 @@ static int unixAccess( if( flags==SQLITE_ACCESS_EXISTS ){ struct stat buf; - *pResOut = (0==osStat(zPath, &buf) && buf.st_size>0); + *pResOut = 0==osStat(zPath, &buf) && + (S_ISDIR(buf.st_mode) || buf.st_size>0); }else{ *pResOut = osAccess(zPath, W_OK|R_OK)==0; } |