PROFILE_open sharing fix
James Keane
james.keane at gmail.com
Fri Aug 17 16:36:34 CDT 2007
This patch just adds the sharing flags to the CreateFile call in
PROFILE_open, to allow opening a file that has previously been opened
with share or delete access.
it should fix the installer bug listed here:
http://bugs.winehq.org/show_bug.cgi?id=5024
-------------- next part --------------
diff --git a/dlls/kernel32/profile.c b/dlls/kernel32/profile.c
index 27a3d06..4d50e1b 100644
--- a/dlls/kernel32/profile.c
+++ b/dlls/kernel32/profile.c
@@ -753,7 +753,7 @@ static BOOL PROFILE_Open( LPCWSTR filename )
TRACE("path: %s\n", debugstr_w(buffer));
- hFile = CreateFileW(buffer, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+ hFile = CreateFileW(buffer, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if ((hFile == INVALID_HANDLE_VALUE) && (GetLastError() != ERROR_FILE_NOT_FOUND))
{
More information about the wine-patches
mailing list