Add wxDir::GetNameWithSep() and use it to avoid consecutive slashes.
It is wrong to use dir.GetName()+"/" to obtain a slash-terminated directory name as this results in (usually harmless but at best ugly) double slashes at at the beginning of the string for the root directory. Add GetNameWithSep() to obtain the correct result in all cases. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71355 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -106,6 +106,10 @@ public:
|
||||
// get the full name of the directory (without '/' at the end)
|
||||
wxString GetName() const;
|
||||
|
||||
// Same as GetName() but does include the trailing separator, unless the
|
||||
// string is empty (only for invalid directories).
|
||||
wxString GetNameWithSep() const;
|
||||
|
||||
|
||||
// file enumeration routines
|
||||
// -------------------------
|
||||
|
Reference in New Issue
Block a user