Skip to content
Permalink
Browse files
Backport of Windows file sharing fix from default branch.
  • Loading branch information
icculus committed Mar 17, 2010
1 parent 9e7d931 commit 06c6e8806b1372d99ab7d771052b1f6b6040bded
Showing with 4 additions and 4 deletions.
  1. +2 −2 platform/pocketpc.c
  2. +2 −2 platform/windows.c
@@ -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

0 comments on commit 06c6e88

Please sign in to comment.