summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorJacob Walls <jacobtylerwalls@gmail.com>2021-06-02 01:03:52 -0400
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-06-02 12:20:22 +0200
commitec2727efef605437eb572d51ca9afbb3a60eda40 (patch)
tree85dc0a1a2b837f76c8a815db720ca022af153f0f /django
parentd9cee3f5f2f90938d2c2c0230be40c7d50aef53d (diff)
Fixed #28154 -- Prevented infinite loop in FileSystemStorage.save() when a broken symlink with the same name exists.
Diffstat (limited to 'django')
-rw-r--r--django/core/files/storage.py2
1 files changed, 1 insertions, 1 deletions
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)