Commit 2dbf9ea3 authored by Mehmet Yasar's avatar Mehmet Yasar Committed by Alexandre Julliard

Fix default extension behavior with GetOpenFileName.

parent add0b5d2
......@@ -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';
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment