From 84d77e5c3ac35dbea123b4dcbf4197ff81ac0a22 Mon Sep 17 00:00:00 2001 From: Eigi Date: Sun, 9 May 2021 18:59:34 +0200 Subject: [PATCH] fix for issue #2299 translate leading backslashes of UNC path to forward slashes. --- Lib/fontTools/designspaceLib/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Lib/fontTools/designspaceLib/__init__.py b/Lib/fontTools/designspaceLib/__init__.py index 9ea22fe69..3bb2bbfc9 100644 --- a/Lib/fontTools/designspaceLib/__init__.py +++ b/Lib/fontTools/designspaceLib/__init__.py @@ -33,6 +33,9 @@ def posix(path): if path.startswith('/'): # The above transformation loses absolute paths new_path = '/' + new_path + elif path.startswith(r'\\'): + # The above transformation loses leading slashes of UNC path mounts + new_path = '//' + new_path return new_path