Support FilePaths instead of raw strings in XML code.

PiperOrigin-RevId: 655177026
Change-Id: I55b055551384b01ba7a4baa5d75fbe3329b7d25d
This commit is contained in:
Kyle Bayes
2024-07-23 08:35:56 -07:00
committed by Copybara-Service
parent 2d24c58819
commit 2746cb8559
10 changed files with 195 additions and 179 deletions
+1 -1
View File
@@ -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));