Skip to content

Commit

Permalink
[Lib/tempfile.py] Canonicalise _mkstemp_inner
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelMarks committed Jan 30, 2024
1 parent cad41e6 commit 7542eab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Lib/tempfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def _get_candidate_names():
def _mkstemp_inner(dir, pre, suf, flags, output_type):
"""Code common to mkstemp, TemporaryFile, and NamedTemporaryFile."""

dir = _os.path.abspath(dir)
dir = _os.path.realpath(_os.path.abspath(dir))
names = _get_candidate_names()
if output_type is bytes:
names = map(_os.fsencode, names)
Expand Down

0 comments on commit 7542eab

Please sign in to comment.