seps = ":";
}
- wxStringTokenizer tn( path, seps );
+ wxStringTokenizer tn( path, seps, wxTOKEN_RET_EMPTY_ALL );
+ bool first = TRUE;
while (tn.HasMoreTokens())
{
wxString token( tn.GetNextToken() );
- if (!token.IsEmpty())
+
+ // If the path starts with a slash, we need the first
+ // dir entry to be an empty for later reassembly.
+
+ if (first || !token.IsEmpty())
m_dirs.Add( token );
+ first = FALSE;
}
if (!dir_only)
format = GetFormat( format );
m_name = name;
+ m_ext = wxEmptyString;
if (m_name == wxT(".")) return;
if (m_name == wxT("..")) return;
else
if (format == wxPATH_UNIX)
{
- ret = '/'; // FIXME: must be absolute
for (size_t i = 0; i < m_dirs.GetCount(); i++)
{
ret += m_dirs[i];
else
if (format == wxPATH_UNIX)
{
- ret = '/'; // FIXME: must be absolute
for (size_t i = 0; i < m_dirs.GetCount(); i++)
{
ret += m_dirs[i];