Skip to content

Commit

Permalink
Settings: escape extension dots in default EXCLUDE list, avoid empty …
Browse files Browse the repository at this point in the history
…entry.
  • Loading branch information
vdboor committed Jul 9, 2014
1 parent 605dc09 commit e8acd28
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion filebrowser/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# django imports
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
import re

# PATH AND URL SETTINGS

Expand Down Expand Up @@ -77,7 +78,7 @@
# Default is to exclude 'thumbnail' style naming of image-thumbnails.
EXTENSION_LIST = []
for exts in EXTENSIONS.values():
EXTENSION_LIST += exts
EXTENSION_LIST += [re.escape(ext) for ext in exts if ext]
EXCLUDE = getattr(settings, 'FILEBROWSER_EXCLUDE', (r'_(%(exts)s)_.*_q\d{1,3}\.(%(exts)s)' % {'exts': ('|'.join(EXTENSION_LIST))},))
# Max. Upload Size in Bytes.
MAX_UPLOAD_SIZE = getattr(settings, "FILEBROWSER_MAX_UPLOAD_SIZE", 10485760)
Expand Down

0 comments on commit e8acd28

Please sign in to comment.