cryptnet: Open file with FILE_SHARE_READ flag in File_RetrieveEncodedObjectW.
This commit is contained in:
parent
4f89321577
commit
437df58dce
@ -1032,8 +1032,8 @@ static BOOL WINAPI File_RetrieveEncodedObjectW(LPCWSTR pszURL,
|
|||||||
/* Try to create the file directly - Wine handles / in pathnames */
|
/* Try to create the file directly - Wine handles / in pathnames */
|
||||||
lstrcpynW(path, components.lpszUrlPath,
|
lstrcpynW(path, components.lpszUrlPath,
|
||||||
components.dwUrlPathLength + 1);
|
components.dwUrlPathLength + 1);
|
||||||
hFile = CreateFileW(path, GENERIC_READ, 0, NULL, OPEN_EXISTING,
|
hFile = CreateFileW(path, GENERIC_READ, FILE_SHARE_READ,
|
||||||
FILE_ATTRIBUTE_NORMAL, NULL);
|
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||||
if (hFile == INVALID_HANDLE_VALUE)
|
if (hFile == INVALID_HANDLE_VALUE)
|
||||||
{
|
{
|
||||||
/* Try again on the current drive */
|
/* Try again on the current drive */
|
||||||
@ -1042,8 +1042,8 @@ static BOOL WINAPI File_RetrieveEncodedObjectW(LPCWSTR pszURL,
|
|||||||
{
|
{
|
||||||
lstrcpynW(path + 2, components.lpszUrlPath,
|
lstrcpynW(path + 2, components.lpszUrlPath,
|
||||||
components.dwUrlPathLength + 1);
|
components.dwUrlPathLength + 1);
|
||||||
hFile = CreateFileW(path, GENERIC_READ, 0, NULL,
|
hFile = CreateFileW(path, GENERIC_READ, FILE_SHARE_READ,
|
||||||
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||||
}
|
}
|
||||||
if (hFile == INVALID_HANDLE_VALUE)
|
if (hFile == INVALID_HANDLE_VALUE)
|
||||||
{
|
{
|
||||||
@ -1053,8 +1053,8 @@ static BOOL WINAPI File_RetrieveEncodedObjectW(LPCWSTR pszURL,
|
|||||||
{
|
{
|
||||||
lstrcpynW(path + 2, components.lpszUrlPath,
|
lstrcpynW(path + 2, components.lpszUrlPath,
|
||||||
components.dwUrlPathLength + 1);
|
components.dwUrlPathLength + 1);
|
||||||
hFile = CreateFileW(path, GENERIC_READ, 0, NULL,
|
hFile = CreateFileW(path, GENERIC_READ, FILE_SHARE_READ,
|
||||||
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user