From 237d7c4e4ef90bae2060d405fa66cdfc3dae6d90 Mon Sep 17 00:00:00 2001 From: Rob McMullen Date: Mon, 25 Apr 2016 23:08:21 -0700 Subject: [PATCH] Fix for long UNC paths (the form \\?\UNC\) being converted to relative paths where UNC was being included in the path as a parent directory --- fs/opener.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/opener.py b/fs/opener.py index 6079226..a965fe5 100644 --- a/fs/opener.py +++ b/fs/opener.py @@ -85,7 +85,7 @@ class NoOpenerError(OpenerError): def _expand_syspath(path): if path is None: return path - if path.startswith('\\\\?\\'): + if path.startswith('\\\\?\\') and not path.startswith('\\\\?\\UNC\\'): path = path[4:] path = os.path.expanduser(os.path.expandvars(path)) path = os.path.normpath(os.path.abspath(path))