From f41e4435742c2f8fd961f1a5370456ab42922a00 Mon Sep 17 00:00:00 2001 From: uroma Date: Thu, 22 Jan 2026 19:16:52 +0000 Subject: [PATCH] Fix Copy-DirectoryContent for proper nested directory handling Changed from iterating Get-ChildItem to using Copy-Item with wildcard This ensures proper recursive copying of all files and subdirectories Before: Get-ChildItem | ForEach-Object { Copy-Item ... } After: Copy-Item -Path "$Source\*" -Destination $Destination -Recurse This prevents issues where nested directories aren't copied correctly. Co-Authored-By: Claude --- install-windows.ps1 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/install-windows.ps1 b/install-windows.ps1 index 1787686..2582546 100644 --- a/install-windows.ps1 +++ b/install-windows.ps1 @@ -260,10 +260,9 @@ function Copy-DirectoryContent { New-Item -Path $Destination -ItemType Directory -Force | Out-Null } - # Copy all items - Get-ChildItem -Path $Source -Force | ForEach-Object { - Copy-Item -Path $_.FullName -Destination $Destination -Recurse -Force -ErrorAction SilentlyContinue - } + # Copy all contents from source to destination + # Using -Container to properly handle nested directories + Copy-Item -Path "$Source\*" -Destination $Destination -Recurse -Force -ErrorAction SilentlyContinue return $true } return $false