1
0
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:
John Hensley 2013-09-06 15:01:54 -04:00 committed by Tim Graham
parent f2a4452882
commit 30fc49a7ca

View File

@ -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()