summaryrefslogtreecommitdiff
path: root/kvmd/fstab.py
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2023-03-05 19:07:36 +0200
committerMaxim Devaev <[email protected]>2023-03-05 19:35:17 +0200
commitacf55a3b2742105af682999626dc733a110f5b86 (patch)
tree860fe240635de7e3b6513c0ed7a746a67a581290 /kvmd/fstab.py
parent7a1f8f32da0550cc140d4ec6a6f3206e21a31a81 (diff)
normpath
Diffstat (limited to 'kvmd/fstab.py')
-rw-r--r--kvmd/fstab.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/kvmd/fstab.py b/kvmd/fstab.py
index 20cd8101..0a4ee9a5 100644
--- a/kvmd/fstab.py
+++ b/kvmd/fstab.py
@@ -20,6 +20,7 @@
# ========================================================================== #
+import os
import re
import dataclasses
@@ -62,8 +63,8 @@ def _find_partitions(part_type: str, single: bool) -> list[Partition]:
options = dict(re.findall(r"X-kvmd\.%s-(root|user)(?:=([^,]+))?" % (part_type), fields[3]))
if options:
parts.append(Partition(
- mount_path=fields[1],
- root_path=(options.get("root", "") or fields[1]),
+ mount_path=os.path.normpath(fields[1]),
+ root_path=os.path.normpath(options.get("root", "") or fields[1]),
user=options.get("user", ""),
))
if single: