From cbf9a9bdbdb063360e6b3198f9dd87e6fc9005cf Mon Sep 17 00:00:00 2001 From: XXXXRT666 <157766680+XXXXRT666@users.noreply.github.com> Date: Wed, 14 May 2025 06:41:03 +0100 Subject: [PATCH] Fix Path --- .github/build_windows_packages.ps1 | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/build_windows_packages.ps1 b/.github/build_windows_packages.ps1 index d51fac33..3f173ec9 100644 --- a/.github/build_windows_packages.ps1 +++ b/.github/build_windows_packages.ps1 @@ -57,8 +57,15 @@ function DownloadAndUnzip($url, $targetRelPath) { $tmpZip = "$tmpDir\$filename" Invoke-WebRequest $url -OutFile $tmpZip Expand-Archive -Path $tmpZip -DestinationPath $tmpDir -Force - Get-ChildItem . - Move-Item "$tmpDir\$($filename -replace '\.zip$', '')" "$srcDir\$targetRelPath" -Force + $subdirName = $filename -replace '\.zip$', '' + $sourcePath = Join-Path $tmpDir $subdirName + $destRoot = Join-Path $srcDir $targetRelPath + $destPath = Join-Path $destRoot $subdirName + if (Test-Path $destPath) { + Remove-Item $destPath -Recurse -Force + } + + Move-Item $sourcePath $destRoot Remove-Item $tmpZip }