Clean up analyzer warnings

This commit is contained in:
Chris Titus
2026-07-02 00:07:56 -05:00
parent 93dc23dd66
commit 67072da1c6
26 changed files with 165 additions and 136 deletions
+1 -1
View File
@@ -180,7 +180,7 @@ function Invoke-WinUtilISOWriteUSB {
Start-Sleep -Seconds 2
Update-Disk -Number $diskNum
try { Remove-PartitionAccessPath -DiskNumber $diskNum -PartitionNumber $winpePart.PartitionNumber -AccessPath "$($winpePart.DriveLetter):" } catch {}
try { Remove-PartitionAccessPath -DiskNumber $diskNum -PartitionNumber $winpePart.PartitionNumber -AccessPath "$($winpePart.DriveLetter):" } catch { Log "Warning: could not remove existing partition access path: $_" }
$usbLetter = Get-FreeDriveLetter
if (-not $usbLetter) { throw "No free drive letters (D-Z) available to assign to the USB data partition." }
Set-Partition -DiskNumber $diskNum -PartitionNumber $winpePart.PartitionNumber -NewDriveLetter $usbLetter