]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filename.cpp
removed shift/reduce conflict
[wxWidgets.git] / src / common / filename.cpp
index ef07caccef375db9fe4ac0e23c06f132233c98e3..3bb86945343298d5d9853574aee1b3f9013117e4 100644 (file)
@@ -249,7 +249,7 @@ bool wxFileName::Normalize(wxPathNormalize flags,
             {
                 curDir.AssignDir(wxGetUserHome(dir.c_str() + 1));
 
-                dirs.Remove(0u);
+                dirs.RemoveAt(0u);
             }
         }
     }
@@ -535,9 +535,12 @@ void wxFileName::SplitPath(const wxString& fullpath,
 
     if ( pstrName )
     {
+        // take all characters starting from the one after the last slash and
+        // up to, but excluding, the last dot
         size_t nStart = posLastSlash == wxString::npos ? 0 : posLastSlash + 1;
-        size_t count = posLastDot == wxString::npos ? wxString::npos
-                                                    : posLastDot - posLastSlash;
+        size_t count = posLastDot == wxString::npos
+                        ? wxString::npos
+                        : posLastDot - posLastSlash - 1;
 
         *pstrName = fullpath.Mid(nStart, count);
     }