From 73668313610bfbf930213134d3cc03fc214674fe Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sun, 9 Jul 2023 19:03:03 +0200 Subject: [PATCH] Count garbage properly --- profiles/DerGeret/Windows/Setup.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/profiles/DerGeret/Windows/Setup.ps1 b/profiles/DerGeret/Windows/Setup.ps1 index 98c818f0..a1866ece 100644 --- a/profiles/DerGeret/Windows/Setup.ps1 +++ b/profiles/DerGeret/Windows/Setup.ps1 @@ -20,12 +20,13 @@ $Global:SetupConfigPostprocessor = { foreach ($partition in $partitionCreations) { $order = [int]$partition.SelectSingleNode("./ua:Order", $namespace).InnerText; - $garbage += [int]$partition.SelectSingleNode("./ua:Size", $namespace).InnerText; $newOrder = $order; if ($order -eq 2) { $newOrder--; } else { + $garbage += [int]$partition.SelectSingleNode("./ua:Size", $namespace).InnerText; + if ($newOrder -lt 2) { $newOrder++; }