From b151cede9f121d8a80ea89ceff61dc1d00c0dfa8 Mon Sep 17 00:00:00 2001
From: Teo Mrnjavac <teo@kde.org>
Date: Fri, 13 May 2016 18:13:29 +0200
Subject: [PATCH] Strip leading / from openswap config path.

---
 src/modules/luksopenswaphookcfg/main.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/modules/luksopenswaphookcfg/main.py b/src/modules/luksopenswaphookcfg/main.py
index 30cc7c8aac..4654e93a08 100644
--- a/src/modules/luksopenswaphookcfg/main.py
+++ b/src/modules/luksopenswaphookcfg/main.py
@@ -21,6 +21,7 @@
 import libcalamares
 import os.path
 
+
 def write_openswap_conf(partitions, root_mount_point, openswap_conf_path):
     swap_outer_uuid = ""
     swap_mapper_name = ""
@@ -71,4 +72,7 @@ def run():
     root_mount_point = libcalamares.globalstorage.value("rootMountPoint")
     openswap_conf_path = libcalamares.job.configuration["configFilePath"]
     partitions = libcalamares.globalstorage.value("partitions")
+
+    openswap_conf_path = openswap_conf_path.lstrip('/')
+
     return write_openswap_conf(partitions, root_mount_point, openswap_conf_path)
-- 
GitLab