From ec2727efef605437eb572d51ca9afbb3a60eda40 Mon Sep 17 00:00:00 2001 From: Jacob Walls Date: Wed, 2 Jun 2021 01:03:52 -0400 Subject: Fixed #28154 -- Prevented infinite loop in FileSystemStorage.save() when a broken symlink with the same name exists. --- django/core/files/storage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'django/core') diff --git a/django/core/files/storage.py b/django/core/files/storage.py index 2cf5e2a5c7..7097dc9585 100644 --- a/django/core/files/storage.py +++ b/django/core/files/storage.py @@ -316,7 +316,7 @@ class FileSystemStorage(Storage): pass def exists(self, name): - return os.path.exists(self.path(name)) + return os.path.lexists(self.path(name)) def listdir(self, path): path = self.path(path) -- cgit v1.3