From 39c87897f7793395fe40fbb8d4cf418bb056245d Mon Sep 17 00:00:00 2001 From: ElrohirGT <45268815+ElrohirGT@users.noreply.github.com> Date: Thu, 2 Dec 2021 15:30:05 -0600 Subject: [PATCH] fix(powershell): resolves #10 (#11) --- AdventOfCode/UserScripts/GenerateSolutionFiles.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AdventOfCode/UserScripts/GenerateSolutionFiles.ps1 b/AdventOfCode/UserScripts/GenerateSolutionFiles.ps1 index 3c2fe3e..0ba7455 100644 --- a/AdventOfCode/UserScripts/GenerateSolutionFiles.ps1 +++ b/AdventOfCode/UserScripts/GenerateSolutionFiles.ps1 @@ -32,14 +32,14 @@ namespace AdventOfCode.Solutions.Year "@ -$newDirectory = Join-Path $PSScriptRoot ".." "Solutions" "Year$Year" +$newDirectory = [IO.Path]::Combine($PSScriptRoot, "..", "Solutions", "Year$Year") if(!(Test-Path $newDirectory)) { New-Item $newDirectory -ItemType Directory | Out-Null } for($i = 1; $i -le 25; $i++) { - $newFile = Join-Path $newDirectory "Day$("{0:00}" -f $i)" "Day$("{0:00}" -f $i).cs" + $newFile = [IO.Path]::Combine($newDirectory, "Day$("{0:00}" -f $i)", "Day$("{0:00}" -f $i).cs") if(!(Test-Path $newFile)) { New-Item $newFile -ItemType File -Value ($template -replace "", $Year -replace "", "$("{0:00}" -f $i)") -Force | Out-Null }