Skip to content

Commit

Permalink
yet another fix for delete on close.
Browse files Browse the repository at this point in the history
delete_on_close=False and delete=True should now delete file upon session end.
  • Loading branch information
manoskary committed Dec 24, 2024
1 parent 59c148c commit e41185f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion partitura/io/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def download_file(url):
extension = os.path.splitext(url)[-1]

# Create a temporary file
temp_file = tempfile.NamedTemporaryFile(suffix=extension, delete_on_close=True)
temp_file = tempfile.NamedTemporaryFile(suffix=extension, delete_on_close=False, delete=True)

# Write the content to the temporary file
with open(temp_file.name, 'wb') as f:
Expand Down

0 comments on commit e41185f

Please sign in to comment.