wxString strPath(pszPathName);
if ( wxEndsWithPathSeparator(pszPathName) && pszPathName[1] != _T('\0') )
strPath.Last() = _T('\0');
wxString strPath(pszPathName);
if ( wxEndsWithPathSeparator(pszPathName) && pszPathName[1] != _T('\0') )
strPath.Last() = _T('\0');