Rename variables properly

This commit is contained in:
Manuel Thalmann 2023-07-08 23:56:47 +02:00
parent 36a663b897
commit abcaf0ef99

View file

@ -18,11 +18,11 @@ $Global:SetupConfigPostprocessor = {
$winPartition = ($partitionCreations | Select-Object -Last 1);
$newPartition = $winPartition.CloneNode($true);
$offset = 0;
$garbage = 0;
foreach ($partition in $partitionCreations) {
$order = [int]$partition.SelectSingleNode("./ua:Order", $namespace).InnerText;
$offset += [int]$partition.SelectSingleNode("./ua:Size", $namespace).InnerText;
$garbage += [int]$partition.SelectSingleNode("./ua:Size", $namespace).InnerText;
$newOrder = $order;
if ($order -eq 2) {
@ -44,7 +44,7 @@ $Global:SetupConfigPostprocessor = {
# Add space before Windows installation... wha-!? For Linux, ofc! I use Arch Linux, btw.
$size = $winPartition.OwnerDocument.CreateElement("Size");
$size.InnerText = "$((1 * 1024 * 1024) - $offset)";
$size.InnerText = "$((1 * 1024 * 1024) - $garbage)";
$winPartition.RemoveChild($winPartition.SelectSingleNode("./ua:Extend", $namespace));
$winPartition.AppendChild($size);