X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b93f4bb9da97b545447df56f21dfce2590ae01e6..cfcc39321282c5877cbb45248bb8004ced24516b:/src/os2/filedlg.cpp?ds=sidebyside diff --git a/src/os2/filedlg.cpp b/src/os2/filedlg.cpp index 605d1b2cc4..cb87d850f1 100644 --- a/src/os2/filedlg.cpp +++ b/src/os2/filedlg.cpp @@ -332,6 +332,7 @@ int wxFileDialog::ShowModal() if (sDir.IsEmpty()) sDir = "*.*"; wxStrcpy(vFileDlg.szFullFile, sDir.c_str()); + sFilterBuffer = sDir; hWnd = ::WinFileDlg( HWND_DESKTOP ,GetHwndOf(m_pParent) @@ -367,8 +368,14 @@ int wxFileDialog::ShowModal() wxStrcpy(zFileNameBuffer, vFileDlg.szFullFile); int nIdx = wxStrlen(zFileNameBuffer) - 1; + wxString sExt; - if (zFileNameBuffer[nIdx] == wxT('.') ) + wxSplitPath( zFileNameBuffer + ,&m_sPath + ,&m_sFileName + ,&sExt + ); + if (zFileNameBuffer[nIdx] == wxT('.') || sExt.IsEmpty()) { zFileNameBuffer[nIdx] = wxT('\0');