From 80b5ae550585ba82ed18e36e052e302da35a06e3 Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Mon, 29 Jul 2013 11:08:53 +0200 Subject: [PATCH] Set zip_gallery to TRUE only if archive exists --- sigal/writer.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sigal/writer.py b/sigal/writer.py index 4c9b948..d2ea5bd 100644 --- a/sigal/writer.py +++ b/sigal/writer.py @@ -144,6 +144,8 @@ class Writer(object): if relpath != '.': ctx['breadcumb'] = self.get_breadcumb(paths, relpath) + ctx['settings']['zip_gallery'] = not not paths[relpath]['medias'] + for i in paths[relpath]['medias']: media_ctx = {} base, ext = os.path.splitext(i)