Skip to content

Commit c785fa3

Browse files
committed
main: Do not crash with the UEFI only option
Fixes: c1d0f18 ("main: Fix partition sizing bug") Fixes: #40 Closes: #41 Signed-off-by: Hector Martin <[email protected]>
1 parent db383a9 commit c785fa3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ def action_install_into_free(self, avail_free):
266266
print()
267267
p_message(f"The new OS will be allocated {ssize(os_size)} of space,")
268268
p_message(f"leaving {ssize(free_part.size - os_size)} of free space.")
269+
os_size -= STUB_SIZE
269270

270271
print()
271272
self.flush_input()
@@ -283,7 +284,7 @@ def action_install_into_free(self, avail_free):
283284
logging.info(f"Creating stub macOS: {label}")
284285
self.part = self.dutil.addPartition(free_part.name, "apfs", label, STUB_SIZE)
285286

286-
self.do_install(os_size - STUB_SIZE)
287+
self.do_install(os_size)
287288

288289
def do_install(self, total_size=None):
289290
p_progress(f"Installing stub macOS into {self.part.name} ({self.part.label})")

0 commit comments

Comments
 (0)