Fix handling of unix/mac hidden files

This commit is contained in:
Augusto de la Torre 2023-04-01 00:05:51 +02:00
parent 38a4818997
commit 49f6c14622
1 changed files with 5 additions and 1 deletions

View File

@ -36,7 +36,11 @@ def walk_and_visit(path, visit_fn, context=None):
files = [] files = []
for name in names: for name in names:
fullname = os.path.join(path, name) fullname = os.path.join(path, name)
if os.path.isdir(fullname) and not str(name).startswith('.'):
if str(name).startswith('.'):
continue
if os.path.isdir(fullname):
dirs.append(fullname) dirs.append(fullname)
else: else:
files.append(fullname) files.append(fullname)