From 960760f07c85472065255d5c66f6ebac856dea8d Mon Sep 17 00:00:00 2001 From: Howard Wu Date: Sun, 19 Mar 2023 02:05:24 +0800 Subject: [PATCH] Restrict the start and end when removing from the file list --- installer/MakePri.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/installer/MakePri.ps1 b/installer/MakePri.ps1 index 6b075bd..d429152 100644 --- a/installer/MakePri.ps1 +++ b/installer/MakePri.ps1 @@ -36,9 +36,9 @@ If ((Test-Path -Path "pri") -Eq $true -And (Test-Path -Path "xml") -Eq $true) { } $ProjectXml.Save($AppxManifestFile) Remove-Item 'pri' -Recurse - Set-Content -Path "filelist.txt" -Value (Get-Content -Path "filelist.txt" | Select-String -Pattern 'pri' -NotMatch) + Set-Content -Path "filelist.txt" -Value (Get-Content -Path "filelist.txt" | Select-String -Pattern '^pri$' -NotMatch) Remove-Item 'xml' -Recurse - Set-Content -Path "filelist.txt" -Value (Get-Content -Path "filelist.txt" | Select-String -Pattern 'xml' -NotMatch) + Set-Content -Path "filelist.txt" -Value (Get-Content -Path "filelist.txt" | Select-String -Pattern '^xml$' -NotMatch) Remove-Item 'makepri.exe' Set-Content -Path "filelist.txt" -Value (Get-Content -Path "filelist.txt" | Select-String -Pattern 'makepri.exe' -NotMatch) Remove-Item $PSCommandPath -Force