From f05c77e53c9e1e1aa0b72e0674be4cda6adf98f1 Mon Sep 17 00:00:00 2001 From: David Refoua Date: Fri, 14 Oct 2022 21:51:04 +0330 Subject: [PATCH] add resolve path for flatten directory function --- scripts/utils.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/utils.ps1 b/scripts/utils.ps1 index 60510d9..1ca2286 100644 --- a/scripts/utils.ps1 +++ b/scripts/utils.ps1 @@ -48,6 +48,7 @@ function Create-Archive($source, $target, $params) { # If directory contains only one child directory # Flatten it instead function Flatten-Directory($name) { + $name = Resolve-Path $name $child = (Get-Childitem $name)[0] Write-Verbose "Moving the '$child' directory's content to '$name'" Rename-Item $name -NewName "$($name)_moving"