From 7c211441f48690078cfa537fdfe3c317fde8f9f3 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 10 Dec 2012 14:41:31 +0000 Subject: [PATCH] Use wxSetWorkingDirectory() instead of chdir(). This fixes compilation of wxGTK under Windows after the changes of r72779 and r72780, where _wchdir() would need to be used but we don't currently have a wxChdir() CRT function wrapper so use wxSetWorkingDirectory() instead. Closes #14886. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73160 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/dirdlg.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/gtk/dirdlg.cpp b/src/gtk/dirdlg.cpp index de1449c750..7372b32300 100644 --- a/src/gtk/dirdlg.cpp +++ b/src/gtk/dirdlg.cpp @@ -31,10 +31,6 @@ #include "wx/gtk/private.h" -#ifdef __UNIX__ -#include // chdir -#endif - extern "C" { static void gtk_dirdialog_response_callback(GtkWidget * WXUNUSED(w), gint response, @@ -131,7 +127,7 @@ void wxDirDialog::GTKOnAccept() // change to the directory where the user went if asked if (HasFlag(wxDD_CHANGE_DIR)) { - chdir(m_selectedDirectory.fn_str()); + wxSetWorkingDirectory(m_selectedDirectory); } EndDialog(wxID_OK); -- 2.45.2