Skip to content

Commit a27bd9e

Browse files
committed
fix: compare filenames with platform-appropriate case sensitivity
Fixes issue #46.
1 parent b9307e6 commit a27bd9e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

django_coverage_plugin/plugin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ class DjangoTemplatePlugin(
156156
def __init__(self):
157157
self.debug_checked = False
158158

159-
self.django_template_dir = os.path.realpath(
159+
self.django_template_dir = os.path.normcase(os.path.realpath(
160160
os.path.dirname(django.template.__file__)
161-
)
161+
))
162162

163163
self.source_map = {}
164164

@@ -175,7 +175,7 @@ def sys_info(self):
175175
]
176176

177177
def file_tracer(self, filename):
178-
if filename.startswith(self.django_template_dir):
178+
if os.path.normcase(filename).startswith(self.django_template_dir):
179179
if not self.debug_checked:
180180
# Keep calling check_debug until it returns True, which it
181181
# will only do after settings have been configured

0 commit comments

Comments
 (0)