mirror of
https://github.com/reactos/wine.git
synced 2025-02-18 03:48:01 +00:00
Fix default extension behavior with GetOpenFileName.
This commit is contained in:
parent
add0b5d28f
commit
2dbf9ea34c
@ -1528,8 +1528,15 @@ BOOL FILEDLG95_OnOpen(HWND hwnd)
|
||||
/* only add "." in case a default extension does exist */
|
||||
if (*fodInfos->ofnInfos->lpstrDefExt != '\0')
|
||||
{
|
||||
int PathLength;
|
||||
PathLength = strlen(lpstrPathAndFile);
|
||||
|
||||
strcat(lpstrPathAndFile, ".");
|
||||
strcat(lpstrPathAndFile, fodInfos->ofnInfos->lpstrDefExt);
|
||||
|
||||
/* if file does not exist try without extension */
|
||||
if (!PathFileExistsA(lpstrPathAndFile))
|
||||
lpstrPathAndFile[PathLength] = '\0';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user