From 30fc49a7ca0d030c7855f31ed44395903fa6abdd Mon Sep 17 00:00:00 2001 From: John Hensley Date: Fri, 6 Sep 2013 15:01:54 -0400 Subject: [PATCH] Fixed #21057 -- Prevented FileSystemStorage from leaving temporary files. --- django/core/files/storage.py | 1 + 1 file changed, 1 insertion(+) diff --git a/django/core/files/storage.py b/django/core/files/storage.py index c1e654beeb..b9f3e01f0d 100644 --- a/django/core/files/storage.py +++ b/django/core/files/storage.py @@ -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()