mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
In the SQLITE_OPEN_NOFOLLOW processing, distinguish between an I/O error
on the xAccess() call and an actual symlink encounter. FossilOrigin-Name: 2e98b42fcb7bc38e22808a9dc1d7a4231ed08ffa97c9f08f33e6e8cd8726856c
This commit is contained in:
@@ -4790,11 +4790,9 @@ int sqlite3PagerOpen(
|
||||
const char *z;
|
||||
if( (vfsFlags & SQLITE_OPEN_NOFOLLOW)!=0 ){
|
||||
int isLink = 0;
|
||||
if( sqlite3OsAccess(pVfs, zFilename, SQLITE_ACCESS_SYMLINK, &isLink)==0
|
||||
&& isLink
|
||||
){
|
||||
return SQLITE_CANTOPEN_SYMLINK;
|
||||
}
|
||||
int rc = sqlite3OsAccess(pVfs, zFilename, SQLITE_ACCESS_SYMLINK, &isLink);
|
||||
if( rc==SQLITE_OK && isLink ) rc = SQLITE_CANTOPEN_SYMLINK;
|
||||
if( rc ) return rc;
|
||||
}
|
||||
nPathname = pVfs->mxPathname+1;
|
||||
zPathname = sqlite3DbMallocRaw(0, nPathname*2);
|
||||
|
Reference in New Issue
Block a user