X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9ee966ecaf0f0c02cf7f0f5e16a8b4d4c66d8858..86171954ec23d82d4095b16cc4477509573152d6:/src/msw/utils.cpp diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp index da2a137857..34b1ee859a 100644 --- a/src/msw/utils.cpp +++ b/src/msw/utils.cpp @@ -61,9 +61,10 @@ extern "C" { #endif #endif //GNUWIN32 -#if defined(__GNUWIN32__) && !defined(__TWIN32__) +#if defined(__CYGWIN__) && !defined(__TWIN32__) #include #include + #include // for cygwin_conv_to_full_win32_path() #endif //GNUWIN32 #ifdef __BORLANDC__ // Please someone tell me which version of Borland needs @@ -372,6 +373,13 @@ const wxChar* wxGetHomeDir(wxString *pstr) // add a trailing slash if needed if ( strDir.Last() != wxT('/') ) strDir << wxT('/'); + + #ifdef __CYGWIN__ + // Cygwin returns unix type path but that does not work well + static wxChar windowsPath[MAX_PATH]; + cygwin_conv_to_full_win32_path(strDir, windowsPath); + strDir = windowsPath; + #endif #else // Windows #ifdef __WIN32__ const wxChar *szHome = wxGetenv(wxT("HOMEDRIVE"));