From 667663dadf0ae0e3dd826535a349e494008b440f Mon Sep 17 00:00:00 2001 From: Robert Date: Fri, 24 Feb 2023 23:00:18 +0100 Subject: [PATCH] Clean up pending directory after installing update --- src/Artemis.UI.Windows/Scripts/update.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Artemis.UI.Windows/Scripts/update.ps1 b/src/Artemis.UI.Windows/Scripts/update.ps1 index 7603b013e..26fbd1165 100644 --- a/src/Artemis.UI.Windows/Scripts/update.ps1 +++ b/src/Artemis.UI.Windows/Scripts/update.ps1 @@ -30,15 +30,15 @@ if (!(Test-Path $destinationDirectory)) { Write-Error "The destination directory does not exist" } - -# If the destination directory exists, clear it +# Clear the destination directory but don't remove it, leaving ACL entries in tact Write-Host "Cleaning up old version where needed" Get-ChildItem $destinationDirectory | Remove-Item -Recurse -Force # Move the contents of the source directory to the destination directory Write-Host "Installing new files" Get-ChildItem $sourceDirectory | Move-Item -Destination $destinationDirectory - +# Remove the now empty source directory +Remove-Item $sourceDirectory Write-Host "Finished! Restarting Artemis" Start-Sleep -Seconds 1