]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filefn.cpp
no real changes, just extract private classes from msw/dc.cpp into a private header...
[wxWidgets.git] / src / common / filefn.cpp
index b732f23a1c869cbd02541ce34ca67ba755ff50dc..cc9f2c89b0761b9109002a04c2455ea93ea36081 100644 (file)
@@ -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
@@ -1288,7 +1279,7 @@ bool wxMkdir(const wxString& dir, int perm)
 #else  // !MSW, !DOS and !OS/2 VAC++
     wxUnusedVar(perm);
   #ifdef __WXWINCE__
-    if ( CreateDirectory(dir, NULL) == 0 )
+    if ( CreateDirectory(dir.fn_str(), NULL) == 0 )
   #else
     if ( wxMkDir(dir.fn_str()) != 0 )
   #endif
@@ -1313,7 +1304,7 @@ bool wxRmdir(const wxString& dir, int WXUNUSED(flags))
   #if defined(__OS2__)
     if ( ::DosDeleteDir(dir.c_str()) != 0 )
   #elif defined(__WXWINCE__)
-    if ( RemoveDirectory(dir) == 0 )
+    if ( RemoveDirectory(dir.fn_str()) == 0 )
   #else
     if ( wxRmDir(dir.fn_str()) != 0 )
   #endif