Don't return wxEmptyString for e.g. wxPathOnly("\file.txt")
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28511 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -879,6 +879,9 @@ wxString wxPathOnly (const wxString& path)
|
||||
// Unix like or Windows
|
||||
if (path[i] == wxT('/') || path[i] == wxT('\\'))
|
||||
{
|
||||
// Don't return an empty string
|
||||
if (i == 0)
|
||||
i ++;
|
||||
buf[i] = 0;
|
||||
return wxString(buf);
|
||||
}
|
||||
|
Reference in New Issue
Block a user