mirror of
https://github.com/django/django.git
synced 2024-12-23 01:25:58 +00:00
Fixed #21057 -- Prevented FileSystemStorage from leaving temporary files.
This commit is contained in:
parent
f2a4452882
commit
30fc49a7ca
@ -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…
Reference in New Issue
Block a user