Skip to content

Commit 9e31719

Browse files
committed
fix so not all hidden files are included
1 parent aada8b1 commit 9e31719

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

metaflow/package.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ def _walk(self, root, exclude_hidden=True, suffixes=None):
8888
# if path and (path[0] == '.' or './' in path):
8989
# continue
9090
for fname in files:
91-
if any(fname.endswith(suffix) for suffix in suffixes):
91+
if (fname[0] == "." and fname in suffixes) or (
92+
fname[0] != "."
93+
and any(fname.endswith(suffix) for suffix in suffixes)
94+
):
9295
p = os.path.join(path, fname)
9396
yield p, p[prefixlen:]
9497

0 commit comments

Comments
 (0)