mirror of
https://github.com/sjlongland/tornado-gallery.git
synced 2025-09-13 08:42:23 +10:00
resizer: Avoid exposing full path, remove double extension
This commit is contained in:
parent
4919e2be7a
commit
d0d6be6659
@ -155,18 +155,17 @@ class ResizerPool(object):
|
||||
orig_node = self._fs_node.join_node(gallery, photo)
|
||||
|
||||
# Determine the name of the cache file.
|
||||
cache_name = self._cache_node.join(
|
||||
('%(gallery)s-%(photo)s-'\
|
||||
cache_name = ('%(gallery)s-%(photo)s-'\
|
||||
'%(width)dx%(height)d-'\
|
||||
'%(quality)d-%(rotation).6f.%(ext)s') % {
|
||||
'gallery': gallery,
|
||||
'photo': photo,
|
||||
'photo': '.'.join(photo.split('.')[:-1]),
|
||||
'width': width,
|
||||
'height': height,
|
||||
'quality': quality,
|
||||
'rotation': rotation,
|
||||
'ext': img_format.ext
|
||||
})
|
||||
}
|
||||
log.debug('Resized file: %s', cache_name)
|
||||
|
||||
# Do we have this file?
|
||||
|
Loading…
Reference in New Issue
Block a user