Windows: open files for read+write sharing, to match Unix.
This commit is contained in:
parent
cd3587bbf3
commit
47c3e8875c
|
@ -331,8 +331,8 @@ static void *doOpen(const char *fname, DWORD mode, DWORD creation, int rdonly)
|
|||
wchar_t *w_fname = NULL;
|
||||
|
||||
UTF8_TO_UNICODE_STACK_MACRO(w_fname, fname);
|
||||
fileHandle = CreateFile(w_fname, mode, FILE_SHARE_READ, NULL,
|
||||
creation, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
fileHandle = CreateFile(w_fname, mode, FILE_SHARE_READ | FILE_SHARE_WRITE,
|
||||
NULL, creation, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
__PHYSFS_smallFree(w_fname);
|
||||
|
||||
BAIL_IF_MACRO(fileHandle == INVALID_HANDLE_VALUE, win32strerror(), NULL);
|
||||
|
|
|
@ -989,8 +989,8 @@ static void *doOpen(const char *fname, DWORD mode, DWORD creation, int rdonly)
|
|||
|
||||
UTF8_TO_UNICODE_STACK_MACRO(wfname, fname);
|
||||
BAIL_IF_MACRO(wfname == NULL, ERR_OUT_OF_MEMORY, NULL);
|
||||
fileHandle = pCreateFileW(wfname, mode, FILE_SHARE_READ, NULL,
|
||||
creation, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
fileHandle = pCreateFileW(wfname, mode, FILE_SHARE_READ | FILE_SHARE_WRITE,
|
||||
NULL, creation, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
__PHYSFS_smallFree(wfname);
|
||||
|
||||
BAIL_IF_MACRO
|
||||
|
|
Loading…
Reference in New Issue