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
@@ -355,6 +355,7 @@ void FileNameTestCase::TestNormalize()
|
||||
{ "b/../bar", wxPATH_NORM_DOTS, "bar", wxPATH_UNIX },
|
||||
{ "c/../../quux", wxPATH_NORM_DOTS, "../quux", wxPATH_UNIX },
|
||||
{ "/c/../../quux", wxPATH_NORM_DOTS, "/quux", wxPATH_UNIX },
|
||||
{ "../../quux", wxPATH_NORM_DOTS, "../../quux", wxPATH_UNIX },
|
||||
|
||||
// test wxPATH_NORM_TILDE: notice that ~ is only interpreted specially
|
||||
// when it is the first character in the file name
|
||||
|
Reference in New Issue
Block a user