mirror of
https://github.com/django/django.git
synced 2025-09-27 04:29:17 +00:00
Fixed #21057 -- Prevented FileSystemStorage from leaving temporary files.
This commit is contained in:
parent
f2a4452882
commit
30fc49a7ca
1 changed files with 1 additions and 0 deletions
|
@ -215,6 +215,7 @@ class FileSystemStorage(Storage):
|
|||
_file = os.fdopen(fd, mode)
|
||||
_file.write(chunk)
|
||||
finally:
|
||||
content.close()
|
||||
locks.unlock(fd)
|
||||
if _file is not None:
|
||||
_file.close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue