X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c67daf87774c71ae9f73af9969008af220e52a11..8fdca65cf20ae4dba861fa6667d6e233cbb900cf:/src/gtk1/utilsgtk.cpp?ds=sidebyside diff --git a/src/gtk1/utilsgtk.cpp b/src/gtk1/utilsgtk.cpp index 050d1718ce..25210a4e0b 100644 --- a/src/gtk1/utilsgtk.cpp +++ b/src/gtk1/utilsgtk.cpp @@ -80,15 +80,11 @@ int wxDisplayDepth(void) // user and home routines //------------------------------------------------------------------------ -char* wxGetHomeDir( char *dest ) +const char* wxGetHomeDir( wxString *home ) { - wxString tmp = wxGetUserHome( wxString() ); - if (tmp.IsNull()) - strcpy( wxBuffer, "/" ); - else - strcpy( wxBuffer, tmp ); - if (dest) strcpy( dest, WXSTRINGCAST tmp ); - return wxBuffer; + *home = wxGetUserHome( wxString() ); + if (home->IsNull()) *home = "/"; + return *home; }; char *wxGetUserHome( const wxString &user )