Browse Source

remove subdirectories for the ones skipped with ignore_dirs

pull/516/head
Simon Conseil 2 years ago
parent
commit
114f4e2d42
  1. 5
      src/sigal/gallery.py

5
src/sigal/gallery.py

@ -734,6 +734,11 @@ class Gallery:
fnmatch.fnmatch(relpath, ignore) for ignore in ignore_dirs
):
self.logger.info("Ignoring %s", relpath)
# Remove sub-directories
for d in dirs[:]:
path = join(relpath, d) if relpath != "." else d
if path in albums.keys():
del albums[path]
continue
# Remove files that match the ignore_files settings

Loading…
Cancel
Save