1
0
mirror of https://github.com/sjlongland/tornado-gallery.git synced 2025-10-29 09:41:50 +10:00

gallery: Ignore files with no . in name.

This commit is contained in:
Stuart Longland 2018-04-17 10:53:58 +10:00
parent e8ec20cfed
commit 82815f740e
Signed by: stuartl
GPG Key ID: 6AA32EFB18079BAA

View File

@ -111,6 +111,8 @@ class Gallery(Mapping):
content = {}
for name in self._fs_node:
# Grab the file extension and analyse
if '.' not in name:
continue
(_, ext) = name.rsplit('.',1)
if ext.lower() not in ('jpg', 'jpe', 'jpeg', 'gif',
'png', 'tif', 'tiff', 'bmp',):