Skip to content

Commit

Permalink
fix: Delete files before IOBit copy
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonjgardner committed Jan 18, 2024
1 parent 207fff8 commit fe943ec
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions v2/installer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,33 @@ function Copy-ShaderFiles() {
}

if ($ioBit) {
$arguments = @("/Copy")
$arguments = @("/Delete")

foreach ($material in $Materials) {
$material = ($material -split "\\")[-1]
$materialPath = Join-Path -Path $mcDest -ChildPath $material
$arguments += "`"$materialPath`","
}

$arguments[-1] = $arguments[-1].TrimEnd(",")
$arguments = $arguments -join " "

$processOptions = @{
FilePath = $($ioBit.AppID)
ArgumentList = $arguments
Wait = $true
}

Start-Process @processOptions

$arguments = @("/Copy", "/Normal")

foreach ($material in $Materials) {
$arguments += "`"$material`","
}

$arguments[-1] = $arguments[-1].TrimEnd(",")
$arguments += $mcDest
$arguments += "`"$mcDest`""
$arguments = $arguments -join " "

$processOptions = @{
Expand Down

0 comments on commit fe943ec

Please sign in to comment.