Commits

Stephen McDonald committed 52468f2 Draft

Better support for S3.

Comments (0)

Files changed (1)

filebrowser_safe/functions.py

     if getattr(mezz_settings, "MEDIA_LIBRARY_PER_SITE", False):
         dirname = os.path.join(dirname, "site-%s" % current_site_id())
     fullpath = os.path.join(mezz_settings.MEDIA_ROOT, dirname)
-    if not default_storage.exists(fullpath):
+    if not default_storage.isdir(fullpath):
         default_storage.makedirs(fullpath)
     return dirname