mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Small simplification to the xOpen method in the unix VFS.
FossilOrigin-Name: 96e7d638ecdabbf84a152036eb01d408d142839e
This commit is contained in:
@@ -5746,7 +5746,8 @@ static int unixOpen(
|
||||
}
|
||||
fd = robust_open(zName, openFlags, openMode);
|
||||
OSTRACE(("OPENX %-3d %s 0%o\n", fd, zName, openFlags));
|
||||
if( fd<0 && errno!=EISDIR && isReadWrite && !isExclusive ){
|
||||
assert( !isExclusive || (openFlags & O_CREAT)!=0 );
|
||||
if( fd<0 && errno!=EISDIR && isReadWrite ){
|
||||
/* Failed to open the file for read/write access. Try read-only. */
|
||||
flags &= ~(SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE);
|
||||
openFlags &= ~(O_RDWR|O_CREAT);
|
||||
|
||||
Reference in New Issue
Block a user