From e42918997ee3c751702bb7913dc255ef533e3a1f Mon Sep 17 00:00:00 2001 From: Jakub Trllo Date: Thu, 16 Feb 2023 13:57:03 +0100 Subject: [PATCH] fix possible issues with destination drive path --- start.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/start.py b/start.py index 6b2cbbd907..4849a241d2 100644 --- a/start.py +++ b/start.py @@ -348,8 +348,15 @@ def run_disk_mapping_commands(settings): mappings = disk_mapping.get(low_platform) or [] for source, destination in mappings: - destination = destination.rstrip('/') - source = source.rstrip('/') + if low_platform == "windows": + destination = destination.replace("/", "\\").rstrip("\\") + source = source.replace("/", "\\").rstrip("\\") + # Add slash after ':' ('G:' -> 'G:\') + if destination.endswith(":"): + destination += "\\" + else: + destination = destination.rstrip("/") + source = source.rstrip("/") if low_platform == "darwin": scr = f'do shell script "ln -s {source} {destination}" with administrator privileges' # noqa