From 93e0ec553dae73a2a86cb23b058414d8f9ae3bd6 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Tue, 6 Nov 2012 10:19:14 +0100 Subject: [PATCH] [1.5.x] Fixed #19254 -- Bug in SESSION_FILE_PATH handling. Thanks simonb for the report. Refs #18194. Backport of 11fd00c from master. --- django/contrib/sessions/backends/file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/contrib/sessions/backends/file.py b/django/contrib/sessions/backends/file.py index f3a71f8271..401c90cf74 100644 --- a/django/contrib/sessions/backends/file.py +++ b/django/contrib/sessions/backends/file.py @@ -176,7 +176,7 @@ class SessionStore(SessionBase): @classmethod def clear_expired(cls): - storage_path = getattr(settings, "SESSION_FILE_PATH", tempfile.gettempdir()) + storage_path = cls._get_storage_path() file_prefix = settings.SESSION_COOKIE_NAME for session_file in os.listdir(storage_path):