diff options
Diffstat (limited to 'coverage/files.py')
-rw-r--r-- | coverage/files.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/coverage/files.py b/coverage/files.py index b328f653..d9495912 100644 --- a/coverage/files.py +++ b/coverage/files.py @@ -59,6 +59,7 @@ def canonical_filename(filename): """ if filename not in CANONICAL_FILENAME_CACHE: + cf = filename if not os.path.isabs(filename): for path in [os.curdir] + sys.path: if path is None: @@ -69,9 +70,9 @@ def canonical_filename(filename): except UnicodeError: exists = False if exists: - filename = f + cf = f break - cf = abs_file(filename) + cf = abs_file(cf) CANONICAL_FILENAME_CACHE[filename] = cf return CANONICAL_FILENAME_CACHE[filename] |