fixed bug in AssignDir() which didn't always consider the argument as directory
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12843 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -257,7 +257,14 @@ void wxFileName::Assign(const wxString& fullpath,
|
||||
|
||||
void wxFileName::AssignDir(const wxString& dir, wxPathFormat format)
|
||||
{
|
||||
Assign(dir, _T(""), format);
|
||||
// always recognize dir as directory, even if it doesn't end with a slash
|
||||
wxString dirname = dir;
|
||||
if ( !wxEndsWithPathSeparator(dirname) )
|
||||
{
|
||||
dirname += GetPathSeparators(format)[0u];
|
||||
}
|
||||
|
||||
Assign(dirname, _T(""), format);
|
||||
}
|
||||
|
||||
void wxFileName::Clear()
|
||||
|
Reference in New Issue
Block a user