mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #21057 -- Prevented FileSystemStorage from leaving temporary files.
This commit is contained in:
@@ -215,6 +215,7 @@ class FileSystemStorage(Storage):
|
|||||||
_file = os.fdopen(fd, mode)
|
_file = os.fdopen(fd, mode)
|
||||||
_file.write(chunk)
|
_file.write(chunk)
|
||||||
finally:
|
finally:
|
||||||
|
content.close()
|
||||||
locks.unlock(fd)
|
locks.unlock(fd)
|
||||||
if _file is not None:
|
if _file is not None:
|
||||||
_file.close()
|
_file.close()
|
||||||
|
|||||||
Reference in New Issue
Block a user