Remove empty entries in windows path splitting

This commit is contained in:
Thomas Nagy 2016-03-27 21:41:21 +02:00
parent 1ebb318ec0
commit c917e1af63
No known key found for this signature in database
GPG Key ID: 67A565EDFDF90E64
1 changed files with 3 additions and 3 deletions

View File

@ -425,13 +425,13 @@ def split_path_cygwin(path):
return ret
return path.split('/')
re_sp = re.compile('[/\\\\]')
re_sp = re.compile('[/\\\\]+')
def split_path_win32(path):
if path.startswith('\\\\'):
ret = re.split(re_sp, path)[2:]
ret = re_sp.split(path)[2:]
ret[0] = '\\' + ret[0]
return ret
return re.split(re_sp, path)
return re_sp.split(path)
msysroot = None
def split_path_msys(path):