Skip to content

Commit

Permalink
Merge pull request #2568 from getnikola/remove-special-scale_images-h…
Browse files Browse the repository at this point in the history
…andling

Fix #2566 -- remove unusual scale_images ignores
  • Loading branch information
Kwpolska committed Nov 25, 2016
2 parents 74ae976 + 98d3ba3 commit 85b22e8
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions nikola/plugins/task/scale_images.py
Expand Up @@ -46,17 +46,12 @@ def set_site(self, site):
def process_tree(self, src, dst):
"""Process all images in a src tree and put the (possibly) rescaled images in the dst folder."""
thumb_fmt = self.kw['image_thumbnail_format']
ignore = set(['.svn'])
base_len = len(src.split(os.sep))
for root, dirs, files in os.walk(src, followlinks=True):
root_parts = root.split(os.sep)
if set(root_parts) & ignore:
continue
dst_dir = os.path.join(dst, *root_parts[base_len:])
utils.makedirs(dst_dir)
for src_name in files:
if src_name in ('.DS_Store', 'Thumbs.db'):
continue
if (not src_name.lower().endswith(tuple(self.image_ext_list)) and not src_name.upper().endswith(tuple(self.image_ext_list))):
continue
dst_file = os.path.join(dst_dir, src_name)
Expand Down

0 comments on commit 85b22e8

Please sign in to comment.