mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #23986 -- Fixed collectstatic --clear failure if STATIC_ROOT dir doesn't exist.
This commit is contained in:
@@ -199,6 +199,9 @@ class Command(BaseCommand):
|
||||
"""
|
||||
Deletes the given relative path using the destination storage backend.
|
||||
"""
|
||||
if not self.storage.exists(path):
|
||||
return
|
||||
|
||||
dirs, files = self.storage.listdir(path)
|
||||
for f in files:
|
||||
fpath = os.path.join(path, f)
|
||||
|
||||
Reference in New Issue
Block a user