From f71df24cd3b6ed059636814ac22fbd314e7d1dd6 Mon Sep 17 00:00:00 2001 From: Fierelier Date: Tue, 22 Aug 2023 15:15:00 +0200 Subject: [PATCH] Fix setup crash, if partition table entries are not in disk order --- mods/live-installer/data/opt/wdvn/installer/main | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/mods/live-installer/data/opt/wdvn/installer/main b/mods/live-installer/data/opt/wdvn/installer/main index 7027562..dae913d 100755 --- a/mods/live-installer/data/opt/wdvn/installer/main +++ b/mods/live-installer/data/opt/wdvn/installer/main @@ -121,16 +121,22 @@ def getDiskTable(disk): length = len(results) index = length - 1 while index >= 0: - if results[index] == "": break + if results[index] != "" and results[index][0] != "/": break index -= 1 if index < 0: return {} - results = results[index + 2:] + results = results[index + 1:] length = len(results) index = 0 while index < length: while results[index].replace(" "," ") != results[index]: results[index] = results[index].replace(" "," ") + + if results[index] == "" or results[index][0] != "/": + del results[index] + length -= 1 + continue + results[index] = results[index].split(" ") index += 1