Better support for UNC paths in external tools

This commit is contained in:
Thomas Nagy 2014-08-04 19:52:58 +02:00
parent 81ce0b6c17
commit 2b5377cd87
No known key found for this signature in database
GPG Key ID: 67A565EDFDF90E64
1 changed files with 6 additions and 3 deletions

View File

@ -80,9 +80,12 @@ def split_path_cygwin(path):
re_sp = re.compile('[/\\\\]')
def split_path_win32(path):
if path.startswith('\\\\'):
ret = re.split(re_sp, path)[2:]
ret[0] = '\\' + ret[0]
return ret
if path.startswith('\\\\?'):
path = path[4:]
else:
ret = re.split(re_sp, path)[2:]
ret[0] = '\\\\' + ret[0]
return ret
return re.split(re_sp, path)
if sys.platform == 'cygwin':