remove subdirectories for the ones skipped with ignore_dirs

This commit is contained in:
Simon Conseil
2024-04-02 21:36:12 +02:00
parent 9eead93ab7
commit 114f4e2d42

View File

@@ -734,6 +734,11 @@ class Gallery:
fnmatch.fnmatch(relpath, ignore) for ignore in ignore_dirs fnmatch.fnmatch(relpath, ignore) for ignore in ignore_dirs
): ):
self.logger.info("Ignoring %s", relpath) 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 continue
# Remove files that match the ignore_files settings # Remove files that match the ignore_files settings