From 6a71677c9ec039286617136e6adcdf486683f44b Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 18 Jun 2025 08:59:02 -0700 Subject: [PATCH] Use Path.Combine for create directory (#6630) Path.Combine will allow for fully qualified paths to override the combination. For example `Path.Combine("a","b","c:\test")` will resolve to `c:\test'. We have depended on such behavior in a few places like https://github.com/Azure/azure-sdk-for-python/blob/d66b5160f2fb9a3ca03e833a65b1c429993b2bc2/eng/pipelines/templates/steps/smoke-test-steps.yml#L99 so I'm reverting back to Path.Combine. Co-authored-by: Wes Haggard --- eng/common/TestResources/New-TestResources.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/TestResources/New-TestResources.ps1 b/eng/common/TestResources/New-TestResources.ps1 index 500bd89d0..078991250 100755 --- a/eng/common/TestResources/New-TestResources.ps1 +++ b/eng/common/TestResources/New-TestResources.ps1 @@ -163,7 +163,7 @@ try { $root = $repositoryRoot = "$PSScriptRoot/../../.." | Resolve-Path if($ServiceDirectory) { - $root = "$repositoryRoot/sdk/$ServiceDirectory" | Resolve-Path + $root = [System.IO.Path]::Combine($repositoryRoot, "sdk", $ServiceDirectory) | Resolve-Path } if ($TestResourcesDirectory) {