From 706406a0bfeff4081435f62f75b103090ffbe164 Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Thu, 31 Oct 2024 16:01:04 -0700 Subject: [PATCH] Fix signing script --- build.psm1 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/build.psm1 b/build.psm1 index 6a0ef060..64f8dc94 100644 --- a/build.psm1 +++ b/build.psm1 @@ -346,7 +346,9 @@ function Copy-1PFilesToSign Copy-Item -Path $file.FullName -Destination $TargetRoot } else { $targetParent = $parent.Replace($SourceRoot, $TargetRoot) - $null = mkdir -Path $targetParent + if (-not (Test-Path $targetParent)) { + $null = mkdir -Path $targetParent + } Copy-Item -Path $file.FullName -Destination $targetParent } } @@ -389,7 +391,9 @@ function Copy-3PFilesToSign Copy-Item -Path $file.FullName -Destination $TargetRoot } else { $targetParent = $parent.Replace($SourceRoot, $TargetRoot) - $null = mkdir -Path $targetParent + if (-not (Test-Path $targetParent)) { + $null = mkdir -Path $targetParent + } Copy-Item -Path $file.FullName -Destination $targetParent } }