Force FILE_GetTempFileName to continue looking for new temp file name

if error returned from CreateFileW is ERROR_SHARING_VIOLATION.
This commit is contained in:
Philip Mason 2003-05-15 22:57:48 +00:00 committed by Alexandre Julliard
parent f8f7cdf0e8
commit 1840e1890f

View File

@ -1090,7 +1090,8 @@ static UINT FILE_GetTempFileName( LPCWSTR path, LPCWSTR prefix, UINT unique,
CloseHandle( handle );
break;
}
if (GetLastError() != ERROR_FILE_EXISTS)
if (GetLastError() != ERROR_FILE_EXISTS &&
GetLastError() != ERROR_SHARING_VIOLATION)
break; /* No need to go on */
num++;
sprintf( buf, "%04x.tmp", num );