filedlg95 patch
Andreas Mohr
a.mohr at mailto.de
Wed Aug 1 17:11:50 CDT 2001
Hi all,
only add "." separator in case a default file name extension does exist
Makes LabView 6i happier than before :-)
--
Andreas Mohr Stauferstr. 6, D-71272 Renningen, Germany
-------------- next part --------------
Determining best CVS host...
Using CVSROOT :pserver:cvs at rhlx01.fht-esslingen.de:/home/wine
Index: dlls/commdlg/filedlg95.c
===================================================================
RCS file: /home/wine/wine/dlls/commdlg/filedlg95.c,v
retrieving revision 1.59
diff -u -r1.59 filedlg95.c
--- dlls/commdlg/filedlg95.c 25 Jul 2001 00:43:30 -0000 1.59
+++ dlls/commdlg/filedlg95.c 1 Aug 2001 20:08:45 -0000
@@ -277,7 +277,7 @@
LPSTR lpstrSavDir = NULL;
DWORD dwFlags = 0;
- /* Initialise FileOpenDlgInfos structure*/
+ /* Initialize FileOpenDlgInfos structure */
fodInfos = (FileOpenDlgInfos*)MemAlloc(sizeof(FileOpenDlgInfos));
ZeroMemory(fodInfos, sizeof(FileOpenDlgInfos));
@@ -298,7 +298,7 @@
dwFlags = ofn->Flags;
ofn->Flags = ofn->Flags|OFN_WINE;
- /* Initialise the dialog property */
+ /* Initialize the dialog property */
fodInfos->DlgInfos.dwDlgProp = 0;
fodInfos->DlgInfos.hwndCustomDlg = (HWND)NULL;
@@ -397,7 +397,7 @@
LPCWSTR lpTemplateName = NULL;
DWORD dwFlags;
- /* Initialise FileOpenDlgInfos structure*/
+ /* Initialize FileOpenDlgInfos structure */
fodInfos = (FileOpenDlgInfos*)MemAlloc(sizeof(FileOpenDlgInfos));
ZeroMemory(fodInfos, sizeof(FileOpenDlgInfos));
@@ -1503,8 +1503,12 @@
{
if (! *PathFindExtensionA(lpstrPathAndFile))
{
- strcat(lpstrPathAndFile, ".");
- strcat(lpstrPathAndFile, fodInfos->ofnInfos->lpstrDefExt);
+ /* only add "." in case a default extension does exist */
+ if (*fodInfos->ofnInfos->lpstrDefExt != '\0')
+ {
+ strcat(lpstrPathAndFile, ".");
+ strcat(lpstrPathAndFile, fodInfos->ofnInfos->lpstrDefExt);
+ }
}
}
More information about the wine-patches
mailing list