Skip to content

Commit fccd42a

Browse files
committed
Fix _mount_luks_partition()
1 parent 58e4a94 commit fccd42a

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

archinstall/lib/installer.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -337,13 +337,14 @@ def _mount_lvm_vol(self, volume: disk.LvmVolume) -> None:
337337
self._mount_btrfs_subvol(volume.dev_path, volume.btrfs_subvols, volume.mount_options)
338338

339339
def _mount_luks_partition(self, part_mod: disk.PartitionModification, luks_handler: Luks2) -> None:
340-
if part_mod.fs_type != disk.FilesystemType.Btrfs:
341-
if part_mod.mountpoint and luks_handler.mapper_dev:
342-
target = self.target / part_mod.relative_mountpoint
343-
disk.device_handler.mount(luks_handler.mapper_dev, target, options=part_mod.mount_options)
340+
if not luks_handler.mapper_dev:
341+
return None
344342

345-
if part_mod.fs_type == disk.FilesystemType.Btrfs and luks_handler.mapper_dev:
343+
if part_mod.fs_type == disk.FilesystemType.Btrfs and part_mod.btrfs_subvols:
346344
self._mount_btrfs_subvol(luks_handler.mapper_dev, part_mod.btrfs_subvols, part_mod.mount_options)
345+
elif part_mod.mountpoint:
346+
target = self.target / part_mod.relative_mountpoint
347+
disk.device_handler.mount(luks_handler.mapper_dev, target, options=part_mod.mount_options)
347348

348349
def _mount_luks_volume(self, volume: disk.LvmVolume, luks_handler: Luks2) -> None:
349350
if volume.fs_type != disk.FilesystemType.Btrfs:

0 commit comments

Comments
 (0)