Skip to content

Commit

Permalink
fix: fixed a bug that caused some devices with empty mount_point to b…
Browse files Browse the repository at this point in the history
…e appended multiple times to self.setup.partitions
  • Loading branch information
Vilez0 committed Apr 25, 2024
1 parent ee52af0 commit 9fd778b
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions live-installer/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,16 +396,7 @@ def format_partitions(self):

def mount_partitions(self):
# Sort partitions for mount order
partitions_sorted = []
mountpoint_sorted = []
for partition in self.setup.partitions:
mountpoint_sorted.append(partition.mount_as)
mountpoint_sorted.sort()
for dir in mountpoint_sorted:
for partition in self.setup.partitions:
if partition.mount_as == dir:
partitions_sorted.append(partition)
self.setup.partitions = partitions_sorted
self.setup.partitions.sort(key = lambda x : x.mount_as, reverse=False)
# Mount the target partition
for partition in self.setup.partitions:
if(partition.mount_as not in [None, "swap"] and partition.subvolumes != [] and not self.is_subvolume_has_mountpoint(partition.subvolumes,"")) or (partition.mount_as not in ["", None, "swap"]):
Expand Down

0 comments on commit 9fd778b

Please sign in to comment.