mirror of
https://github.com/greflm13/StaticGalleryBuilder.git
synced 2026-02-05 02:59:27 +00:00
glob support added to filesystem traverse
This commit is contained in:
@@ -129,7 +129,12 @@ def get_total_folders(folder: str, _total: int = 0) -> int:
|
|||||||
if item not in EXCLUDES:
|
if item not in EXCLUDES:
|
||||||
if os.path.isdir(os.path.join(folder, item)):
|
if os.path.isdir(os.path.join(folder, item)):
|
||||||
if item not in args.exclude_folders:
|
if item not in args.exclude_folders:
|
||||||
_total = get_total_folders(os.path.join(folder, item), _total)
|
skip = False
|
||||||
|
for exclude in args.exclude_folders:
|
||||||
|
if fnmatch.fnmatchcase(os.path.join(folder, item), exclude):
|
||||||
|
skip = True
|
||||||
|
if not skip:
|
||||||
|
_total = get_total_folders(os.path.join(folder, item), _total)
|
||||||
return _total
|
return _total
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user