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.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index e949c20cd..77aafccce 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -4604,6 +4604,12 @@ static int unixAccess(
assert(!"Invalid flags argument");
}
*pResOut = (access(zPath, amode)==0);
+ if( flags==SQLITE_ACCESS_EXISTS && *pResOut ){
+ struct stat buf;
+ if( 0==stat(zPath, &buf) && buf.st_size==0 ){
+ *pResOut = 0;
+ }
+ }
return SQLITE_OK;
}