aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2019-12-27 13:30:46 +0000
committerdrh <drh@noemail.net>2019-12-27 13:30:46 +0000
commit09bee5743dc30891e08591f237c23c6964c0a0aa (patch)
treef2dd17d11afdc34e47bc4945e4473562be1d3d63 /src/os_unix.c
parent5e484cb3ebd8fe3f14df1ae07810625202e47a3a (diff)
downloadsqlite-09bee5743dc30891e08591f237c23c6964c0a0aa.tar.gz
sqlite-09bee5743dc30891e08591f237c23c6964c0a0aa.zip
Follow-up to check-in [c8c6dd0e6582ec91] - change the xAccess() method to
return true if the file exists and it is anything other than a regular file, or if it is a regular file with a non-zero file size. FossilOrigin-Name: 8a39803ef8db4d8cb0d231e66299525fad4e61266ca29b3704aebb88df1c745b
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index e6d58811c..07ae4bc03 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -6260,7 +6260,7 @@ static int unixAccess(
if( flags==SQLITE_ACCESS_EXISTS ){
struct stat buf;
*pResOut = 0==osStat(zPath, &buf) &&
- (S_ISDIR(buf.st_mode) || buf.st_size>0);
+ (!S_ISREG(buf.st_mode) || buf.st_size>0);
}else{
*pResOut = osAccess(zPath, W_OK|R_OK)==0;
}