Use r-string for re.match windows drive letter.
This commit is contained in:
parent
281e95f184
commit
154f02f5bb
1 changed files with 1 additions and 1 deletions
|
@ -112,7 +112,7 @@ class Path:
|
|||
absolute_path = path.absolute_path
|
||||
else:
|
||||
path = path.strip()
|
||||
if re.search('^[A-Za-z]:$', path):
|
||||
if re.match(r'^[A-Za-z]:$', path):
|
||||
# Bare Windows drive letter.
|
||||
path += self.sep
|
||||
path = normalize_sep(path)
|
||||
|
|
Loading…
Reference in a new issue