1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

On winOpen(), redo the read-only test on every retry attempt. Just

don't retry the winAccess() call.

FossilOrigin-Name: ccdd67ad9a508530ccfcec582410768c24bca4eb8b05939577fb99a50dd44b15
This commit is contained in:
drh
2025-03-26 17:05:29 +00:00
parent 4a6de7ff7c
commit a6f6fa8675
3 changed files with 10 additions and 10 deletions

View File

@ -5473,7 +5473,7 @@ static int winOpen(
dwCreationDisposition,
&extendedParameters);
if( h!=INVALID_HANDLE_VALUE ) break;
if( isReadWrite && cnt==0 ){
if( isReadWrite ){
int rc2;
sqlite3BeginBenignMalloc();
rc2 = winAccess(pVfs, zUtf8Name, SQLITE_ACCESS_READ|NORETRY, &isRO);
@ -5490,7 +5490,7 @@ static int winOpen(
dwFlagsAndAttributes,
NULL);
if( h!=INVALID_HANDLE_VALUE ) break;
if( isReadWrite && cnt==0 ){
if( isReadWrite ){
int rc2;
sqlite3BeginBenignMalloc();
rc2 = winAccess(pVfs, zUtf8Name, SQLITE_ACCESS_READ|NORETRY, &isRO);
@ -5510,7 +5510,7 @@ static int winOpen(
dwFlagsAndAttributes,
NULL);
if( h!=INVALID_HANDLE_VALUE ) break;
if( isReadWrite && cnt==0 ){
if( isReadWrite ){
int rc2;
sqlite3BeginBenignMalloc();
rc2 = winAccess(pVfs, zUtf8Name, SQLITE_ACCESS_READ|NORETRY, &isRO);