No subject
Tue Aug 30 15:12:41 CDT 2005
ChangeLog:
* dlls/ole32/storage32.c
don't try to create file 2 times in the NULL filename case for StgCreateDocFile
--=====================_985994341==_
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: attachment; filename="stgcreat.dif"
Index: dlls/ole32/storage32.c
===================================================================
RCS file: /home/wine/wine/dlls/ole32/storage32.c,v
retrieving revision 1.19
diff -u -r1.19 storage32.c
--- dlls/ole32/storage32.c 2001/02/28 05:31:03 1.19
+++ dlls/ole32/storage32.c 2001/03/30 21:01:47
@@ -5269,6 +5269,7 @@
DWORD creationMode;
DWORD fileAttributes;
WCHAR tempFileName[MAX_PATH];
+ BOOL isTemp = FALSE;
TRACE("(%s, %lx, %ld, %p)\n",
debugstr_w(pwcsName), grfMode,
@@ -5294,6 +5295,13 @@
WCHAR tempPath[MAX_PATH];
WCHAR prefix[] = { 'S', 'T', 'O', 0 };
+ if (!(grfMode & STGM_SHARE_EXCLUSIVE))
+ return STG_E_INVALIDFLAG;
+ if (!(grfMode & (STGM_WRITE|STGM_READWRITE)))
+ return STG_E_INVALIDFLAG;
+
+ isTemp = TRUE;
+
memset(tempPath, 0, sizeof(tempPath));
memset(tempFileName, 0, sizeof(tempFileName));
@@ -5312,6 +5320,9 @@
shareMode = GetShareModeFromSTGM(grfMode);
accessMode = GetAccessModeFromSTGM(grfMode);
creationMode = GetCreationModeFromSTGM(grfMode);
+
+ if (isTemp)
+ creationMode = TRUNCATE_EXISTING;
if (grfMode & STGM_DELETEONRELEASE)
fileAttributes = FILE_FLAG_RANDOM_ACCESS | FILE_FLAG_DELETE_ON_CLOSE;
--=====================_985994341==_
Content-Type: text/plain; charset="us-ascii"
--=====================_985994341==_--
More information about the wine-patches
mailing list