diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2019-11-28 16:17:35 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2019-11-28 16:17:35 -0500 |
commit | 5901967e95ae72ec2b5be05bc08e1924e08a604b (patch) | |
tree | c4cef786d1a0d9f596b3545111ddae2f8f14ff25 /coverage/files.py | |
parent | 4e3e44bcea08674219e2ed16617633a562763f67 (diff) | |
download | python-coveragepy-git-5901967e95ae72ec2b5be05bc08e1924e08a604b.tar.gz |
Don't do vars and users in abs_file
It meant file names could be incorrectly expanded.
Diffstat (limited to 'coverage/files.py')
-rw-r--r-- | coverage/files.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/coverage/files.py b/coverage/files.py index 2836d4e5..5c2ff1ac 100644 --- a/coverage/files.py +++ b/coverage/files.py @@ -159,9 +159,8 @@ else: @contract(returns='unicode') -def abs_file(filename): - """Return the absolute normalized form of `filename`.""" - path = os.path.expandvars(os.path.expanduser(filename)) +def abs_file(path): + """Return the absolute normalized form of `path`.""" try: path = os.path.realpath(path) except UnicodeError: |