summaryrefslogtreecommitdiff
path: root/coverage/files.py
diff options
context:
space:
mode:
Diffstat (limited to 'coverage/files.py')
-rw-r--r--coverage/files.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/coverage/files.py b/coverage/files.py
index 59b2bd61..1cf4b18e 100644
--- a/coverage/files.py
+++ b/coverage/files.py
@@ -216,17 +216,19 @@ class TreeMatcher(object):
"""
def __init__(self, paths):
- self.paths = list(paths)
+ self.original_paths = list(paths)
+ self.paths = list(map(os.path.normcase, paths))
def __repr__(self):
return "<TreeMatcher %r>" % self.paths
def info(self):
"""A list of strings for displaying when dumping state."""
- return self.paths
+ return self.original_paths
def match(self, fpath):
"""Does `fpath` indicate a file in one of our trees?"""
+ fpath = os.path.normcase(fpath)
for p in self.paths:
if fpath.startswith(p):
if fpath == p: