+// ----------------------------------------------------------------------------
+// wxDir::GetNameWithSep()
+// ----------------------------------------------------------------------------
+
+wxString wxDir::GetNameWithSep() const
+{
+ // Note that for historical reasons (i.e. because GetName() was there
+ // first) we implement this one in terms of GetName() even though it might
+ // actually make more sense to reverse this logic.
+
+ wxString name = GetName();
+ if ( !name.empty() )
+ {
+ // Notice that even though GetName() isn't supposed to return the
+ // separator, it can still be present for the root directory name.
+ if ( name.Last() != wxFILE_SEP_PATH )
+ name += wxFILE_SEP_PATH;
+ }
+
+ return name;
+}
+