From eac2aeb01ee8c61d573e3b23768e74248927c04c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 11 Apr 1999 23:19:48 +0000 Subject: [PATCH] wxGetCwd fixed git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2092 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/filefn.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index e90945a676..e3c2d2410f 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -1435,7 +1435,13 @@ char *wxGetWorkingDirectory(char *buf, int sz) wxString wxGetCwd() { - return wxString(wxGetWorkingDirectory()); + static const size_t maxPathLen = 1024; + + wxString str; + wxGetWorkingDirectory(str.GetWriteBuf(maxPathLen), maxPathLen); + str.UngetWriteBuf(); + + return str; } bool wxSetWorkingDirectory(const wxString& d) -- 2.50.0