X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4a3c54bfa5d912f2d667ae55be215c4d27a5268a..32bcf97466effcd064f239561763aff56e7d79c6:/src/common/filefn.cpp diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index b732f23a1c..f74282c55f 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -131,7 +131,7 @@ const int wxInvalidOffset = -1; // regardless of the mode parameter. This hack works around the problem by // setting the mode with _wchmod. // -int wxCRT_Open(const wchar_t *pathname, int flags, mode_t mode) +int wxCRT_OpenW(const wchar_t *pathname, int flags, mode_t mode) { int moreflags = 0; @@ -384,16 +384,7 @@ void wxStripExtension(wchar_t *buffer) { wxDoStripExtension(buffer); } void wxStripExtension(wxString& buffer) { - //RN: Be careful about the handling the case where - //buffer.length() == 0 - for(size_t i = buffer.length() - 1; i != wxString::npos; --i) - { - if (buffer.GetChar(i) == wxT('.')) - { - buffer = buffer.Left(i); - break; - } - } + buffer = wxFileName::StripExtension(buffer); } // Destructive removal of /./ and /../ stuff