1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-15 11:41:13 +03:00

If an open as read/write fails, do not try to reopen as read-only if in

exclusive access mode.

FossilOrigin-Name: 263c5fb2802f8c84835e42fc66acb1065b7e42b9
This commit is contained in:
drh
2011-09-25 17:49:26 +00:00
parent a682a6b578
commit 3051dc1c7f
3 changed files with 9 additions and 9 deletions

View File

@@ -2615,7 +2615,7 @@ static int winOpen(
pFile->lastErrno = GetLastError();
winLogError(SQLITE_CANTOPEN, "winOpen", zUtf8Name);
free(zConverted);
if( isReadWrite ){
if( isReadWrite && !isExclusive ){
return winOpen(pVfs, zName, id,
((flags|SQLITE_OPEN_READONLY)&~(SQLITE_OPEN_CREATE|SQLITE_OPEN_READWRITE)), pOutFlags);
}else{