X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4dba84be231243149a45a286a651d02be8487423..d13c32e99d20b8282f590b5f5beef50b63662e5a:/src/msw/filedlg.cpp?ds=inline diff --git a/src/msw/filedlg.cpp b/src/msw/filedlg.cpp index eaed27850c..cf53ed8159 100644 --- a/src/msw/filedlg.cpp +++ b/src/msw/filedlg.cpp @@ -222,12 +222,19 @@ int wxFileDialog::ShowModal(void) of.lpstrFileTitle = titleBuffer; of.nMaxFileTitle = MAXFILE + 1 + MAXEXT; // Windows 3.0 and 3.1 + // Convert forward slashes to backslashes (file selector doesn't like + // forward slashes) + size_t i = 0; + size_t len = m_dir.Length(); + for (i = 0; i < len; i++) + if (m_dir[i] == '/') + m_dir[i] = '\\'; + of.lpstrInitialDir = (const char *) m_dir; of.Flags = msw_flags; - //=== Like Alejandro Sierra's wildcard modification >>=================== /* In wxFileSelector you can put, instead of a single wild_card, @@ -259,7 +266,7 @@ int wxFileDialog::ShowModal(void) filterBuffer += "|"; // Replace | with \0 - for ( unsigned int i = 0; i < filterBuffer.Len(); i++ ) { + for (i = 0; i < filterBuffer.Len(); i++ ) { if ( filterBuffer.GetChar(i) == '|' ) { filterBuffer[i] = '\0'; }