mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
In the xAccess() method of the unix VFS, return true if the named object
is a directory, regardless of what stat() reports as the st_size for the object. Different filesystems report st_size differently for directories. Problem reported on the mailing list by Stefan Brüns. FossilOrigin-Name: c8c6dd0e6582ec9103d007b294c42bb1820be1fa7dab85d873b04e0b90571626
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user