mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user