Support FilePaths instead of raw strings in XML code.
PiperOrigin-RevId: 655177026 Change-Id: I55b055551384b01ba7a4baa5d75fbe3329b7d25d
This commit is contained in:
committed by
Copybara-Service
parent
2d24c58819
commit
2746cb8559
@@ -996,7 +996,7 @@ std::string FilePath::PathReduce(const std::string& str) {
|
||||
if (IsSeperator(str[i])) {
|
||||
std::string temp = str.substr(j, i - j);
|
||||
j = i + 1;
|
||||
if (temp == ".." && !dirs.empty()) {
|
||||
if (temp == ".." && !dirs.empty() && dirs.back() != "..") {
|
||||
dirs.pop_back();
|
||||
} else if (temp != ".") {
|
||||
dirs.push_back(std::move(temp));
|
||||
|
||||
Reference in New Issue
Block a user