Use r-string for re.match windows drive letter.

This commit is contained in:
voussoir 2021-11-07 18:54:17 -08:00
parent 281e95f184
commit 154f02f5bb
No known key found for this signature in database
GPG key ID: 5F7554F8C26DACCB

View file

@ -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)