From 1aac19caaf124cec1114b6a4eb27a56f9d1a5d31 Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Thu, 4 Jun 2015 17:55:40 -0400 Subject: [PATCH] Honor 'IGNORE_FILES' in the static generator (issue 1692) This means, for instance, that editor backups and similar will no longer be copied out of a theme static directory into the built website. --- pelican/generators.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pelican/generators.py b/pelican/generators.py index 82a4b790..d3c657bf 100644 --- a/pelican/generators.py +++ b/pelican/generators.py @@ -670,10 +670,12 @@ class StaticGenerator(Generator): for path in paths: if final_path: copy(os.path.join(source, path), - os.path.join(output_path, destination, final_path)) + os.path.join(output_path, destination, final_path), + self.settings['IGNORE_FILES']) else: copy(os.path.join(source, path), - os.path.join(output_path, destination, path)) + os.path.join(output_path, destination, path), + self.settings['IGNORE_FILES']) def generate_context(self): self.staticfiles = []