fixed handling of root paths: now checks if string ends with / before appending / to it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10111 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -221,7 +221,11 @@ void wxRegConfig::SetPath(const wxString& strPath)
|
||||
{
|
||||
strFullPath.reserve(2*m_strPath.length());
|
||||
|
||||
strFullPath << m_strPath << wxCONFIG_PATH_SEPARATOR << strPath;
|
||||
strFullPath << m_strPath;
|
||||
if ( strFullPath.Len() == 0 ||
|
||||
strFullPath.Last() != wxCONFIG_PATH_SEPARATOR )
|
||||
strFullPath << wxCONFIG_PATH_SEPARATOR;
|
||||
strFullPath << strPath;
|
||||
}
|
||||
|
||||
// simplify it: we need to handle ".." here
|
||||
|
||||
Reference in New Issue
Block a user