m_dirs.Insert(wxT(".."), 0u);
}
+ if ( format == wxPATH_UNIX || format == wxPATH_DOS )
+ {
+ // a directory made relative with respect to itself is '.' under Unix
+ // and DOS, by definition (but we don't have to insert "./" for the
+ // files)
+ if ( m_dirs.IsEmpty() && IsDir() )
+ {
+ m_dirs.Add(_T('.'));
+ }
+ }
+
m_relative = TRUE;
// we were modified
return GetPathSeparators(format).Find(ch) != wxNOT_FOUND;
}
-bool wxFileName::IsWild( wxPathFormat WXUNUSED(format) )
-{
- // FIXME: this is probably false for Mac and this is surely wrong for most
- // of Unix shells (think about "[...]")
- return m_name.find_first_of(_T("*?")) != wxString::npos;
-}
-
// ----------------------------------------------------------------------------
// path components manipulation
// ----------------------------------------------------------------------------