From d0db5c163d7040e8ea642c4e9d65707524efaced Mon Sep 17 00:00:00 2001 From: Bowen Ding Date: Tue, 14 Apr 2020 22:28:45 +0800 Subject: [PATCH] Avoid encrypting twice in case 'use_orig' is used --- sigal/plugins/encrypt/encrypt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sigal/plugins/encrypt/encrypt.py b/sigal/plugins/encrypt/encrypt.py index 0e71a71..a3435fc 100644 --- a/sigal/plugins/encrypt/encrypt.py +++ b/sigal/plugins/encrypt/encrypt.py @@ -149,10 +149,10 @@ def save_property(cache, media): def get_encrypt_list(settings, media): to_encrypt = [] - to_encrypt.append(media.filename) #resized image + to_encrypt.append(media.filename) #resized image or in case of "use_orig", the original if settings["make_thumbs"]: to_encrypt.append(get_thumb(settings, media.filename)) #thumbnail - if media.big is not None: + if media.big is not None and not settings["use_orig"]: to_encrypt.append(media.big) #original image to_encrypt = list(map(lambda path: os.path.join(media.path, path), to_encrypt)) return to_encrypt