From af1538a139349f274dd19b28ce4b88d251398825 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Mon, 20 Jan 2020 21:29:33 -0800 Subject: [PATCH] Tighten the regex for bare drives. --- voussoirkit/pathclass.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/voussoirkit/pathclass.py b/voussoirkit/pathclass.py index b89e37d..2d1d001 100644 --- a/voussoirkit/pathclass.py +++ b/voussoirkit/pathclass.py @@ -27,7 +27,7 @@ class Path: self.absolute_path = path.absolute_path else: path = path.strip() - if re.search('[A-Za-z]:$', path): + if re.search('^[A-Za-z]:$', path): # Bare Windows drive letter. path += self.sep path = normalize_sep(path)