From d35a4795f16e51f5773d00dce796f6948f82dae2 Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Fri, 16 Dec 2022 21:08:02 -0500 Subject: add upstream 11.29 --- zen/resolve_path.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'zen/resolve_path.cpp') diff --git a/zen/resolve_path.cpp b/zen/resolve_path.cpp index 99e2f6c6..8b81e184 100644 --- a/zen/resolve_path.cpp +++ b/zen/resolve_path.cpp @@ -179,7 +179,7 @@ namespace //expand volume name if possible, return original input otherwise -Zstring expandVolumeName(Zstring pathPhrase) // [volname]:\folder [volname]\folder [volname]folder -> C:\folder +Zstring tryExpandVolumeName(Zstring pathPhrase) // [volname]:\folder [volname]\folder [volname]folder -> C:\folder { //we only expect the [.*] pattern at the beginning => do not touch dir names like "C:\somedir\[stuff]" trim(pathPhrase, true, false); @@ -205,7 +205,7 @@ std::vector zen::getPathPhraseAliases(const Zstring& itemPath) { //should use a replaceCpy() that considers "local path" case-sensitivity (if only we had one...) if (contains(itemPath, macroPath)) - pathAliases.push_back(makePathPhrase(replaceCpyAsciiNoCase(itemPath, macroPath, MACRO_SEP + Zstring(macroName) + MACRO_SEP))); + pathAliases.push_back(makePathPhrase(replaceCpyAsciiNoCase(itemPath, macroPath, Zstring() + MACRO_SEP + macroName + MACRO_SEP))); }; for (const Zchar* envName : @@ -242,7 +242,7 @@ Zstring zen::getResolvedFilePath(const Zstring& pathPhrase) //noexcept trim(path); //remove leading/trailing whitespace before allowing misinterpretation in applyLongPathPrefix() { - path = expandVolumeName(path); //may block for slow USB sticks and idle HDDs! + path = tryExpandVolumeName(path); //may block for slow USB sticks and idle HDDs! /* need to resolve relative paths: WINDOWS: -- cgit