Skip to content

Commit

Permalink
fixes #869: opening unfinalized files found in the temporary directory
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhrisca committed Oct 23, 2023
1 parent 8283c74 commit 8fa5e55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/asammdf/blocks/mdf_v4.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ def __init__(

if version >= "4.10" and flags:
tmpdir = Path(gettempdir())
self.name = tmpdir / Path(name).name
self.name = tmpdir / f"{os.urandom(6).hex()}_{Path(name).name}"
shutil.copy(name, self.name)
self._file = open(self.name, "rb+")
self._from_filelike = False
Expand Down

0 comments on commit 8fa5e55

Please sign in to comment.