Fix bug in wxFileName::Normalize() with leading ".."
Don't discard initial ".." when there is more than one such component in the beginning of the path. Closes #18800.
This commit is contained in:
committed by
Vadim Zeitlin
parent
ff87733cd8
commit
a571a13d44
@@ -1518,10 +1518,13 @@ bool wxFileName::Normalize(int flags,
|
||||
continue;
|
||||
|
||||
}
|
||||
else // Normal case, go one step up.
|
||||
else // Normal case, go one step up unless it's .. as well.
|
||||
{
|
||||
m_dirs.pop_back();
|
||||
continue;
|
||||
if (m_dirs.back() != wxT("..") )
|
||||
{
|
||||
m_dirs.pop_back();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user