diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index 4dd3e7a486..f887f465d9 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -735,16 +735,7 @@ wxChar *wxFileNameFromPath (wxChar *path) wxString wxFileNameFromPath (const wxString& path) { - wxString name, ext; - wxFileName::SplitPath(path, NULL, &name, &ext); - - wxString fullname = name; - if ( !ext.empty() ) - { - fullname << wxFILE_SEP_EXT << ext; - } - - return fullname; + return wxFileName(path).GetFullName(); } // Return just the directory, or NULL if no directory