Skip to content

Commit

Permalink
Get-DscConfiguration実行時に展開先フォルダがロックされて削除できなくなることがある問題を修正 #1
Browse files Browse the repository at this point in the history
  • Loading branch information
mkht committed Oct 7, 2019
1 parent a19d949 commit c98a521
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DSCResources/x7ZipArchive/x7ZipArchive.psm1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Requires -Version 5
#Requires -Version 5
using namespace System.IO;

$script:7zExe = Join-Path (Split-Path (Split-Path $PSScriptRoot -Parent) -Parent) '\Libs\7-Zip\7z.exe'
Expand Down Expand Up @@ -897,7 +897,7 @@ function Test-ArchiveExistsAtDestination {
return $false
}

if ($null -eq (Get-ChildItem -LiteralPath $Destination -Force | Select-Object -First 1)) {
if ((Get-ChildItem -LiteralPath $Destination -Force | Measure-Object).Count -eq 0) {
#Destination folder is empty
Write-Verbose 'The destination folder is empty'
return $false
Expand Down

0 comments on commit c98a521

Please sign in to comment.