diff options
Diffstat (limited to 'coverage/files.py')
-rw-r--r-- | coverage/files.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/coverage/files.py b/coverage/files.py index 82f4df31..bfd808ff 100644 --- a/coverage/files.py +++ b/coverage/files.py @@ -435,6 +435,9 @@ class PathAliases: new = new.replace(sep(path), sep(result)) if not self.relative: new = canonical_filename(new) + dot_start = result.startswith(("./", ".\\")) and len(result) > 2 + if new.startswith(("./", ".\\")) and not dot_start: + new = new[2:] self.debugfn( f"Matched path {path!r} to rule {original_pattern!r} -> {result!r}, " + f"producing {new!r}" |