eric7/DebugClients/Python/coverage/files.py

branch
eric7
changeset 8527
2bd1325d727e
parent 8312
800c432b34c8
child 8775
0802ae193343
--- a/eric7/DebugClients/Python/coverage/files.py	Fri Aug 20 19:56:17 2021 +0200
+++ b/eric7/DebugClients/Python/coverage/files.py	Sat Aug 21 14:21:44 2021 +0200
@@ -359,17 +359,19 @@
         match an entire tree, and not just its root.
 
         """
+        pattern_sep = sep(pattern)
+
         if len(pattern) > 1:
             pattern = pattern.rstrip(r"\/")
 
         # The pattern can't end with a wildcard component.
         if pattern.endswith("*"):
             raise CoverageException("Pattern must not end with wildcards.")
-        pattern_sep = sep(pattern)
 
         # The pattern is meant to match a filepath.  Let's make it absolute
         # unless it already is, or is meant to match any prefix.
-        if not pattern.startswith('*') and not isabs_anywhere(pattern):
+        if not pattern.startswith('*') and not isabs_anywhere(pattern +
+                                                              pattern_sep):
             pattern = abs_file(pattern)
         if not pattern.endswith(pattern_sep):
             pattern += pattern_sep

eric ide

mercurial