We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f4ac155 + 1feb768 commit 9e55070Copy full SHA for 9e55070
1 file changed
installer/fix_paths.ps1
@@ -33,8 +33,11 @@ function Resolve-OldBasePath {
33
)
34
35
foreach ($name in $componentNames) {
36
- $pattern = "(?<base>[A-Za-z]:\\[^`r`n]+?)\\$name(\\|/)"
37
- $match = [regex]::Match($Text, $pattern)
+ $escapedName = [regex]::Escape($name)
+ # Use a greedy base match so repeated folder names (e.g. gcbm_view\gcbm_view\gcbm_view)
38
+ # resolve to the deepest workspace base path before the component folder.
39
+ $pattern = "(?<base>[A-Za-z]:\\[^`r`n]+)\\$escapedName(?=\\|/)"
40
+ $match = [regex]::Match($Text, $pattern, [System.Text.RegularExpressions.RegexOptions]::IgnoreCase)
41
if ($match.Success) {
42
return $match.Groups["base"].Value.TrimEnd('\')
43
}
0 commit comments