mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Add support for SQLITE_OPEN_NOFOLLOW.
FossilOrigin-Name: cb79c828496a703f1410f61458ebc1e15a92a63412b36f51945b2b5a32ec6e88
This commit is contained in:
@@ -4788,6 +4788,14 @@ int sqlite3PagerOpen(
|
||||
*/
|
||||
if( zFilename && zFilename[0] ){
|
||||
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;
|
||||
}
|
||||
}
|
||||
nPathname = pVfs->mxPathname+1;
|
||||
zPathname = sqlite3DbMallocRaw(0, nPathname*2);
|
||||
if( zPathname==0 ){
|
||||
|
Reference in New Issue
Block a user