diff options
author | 2023-03-09 20:24:52 -0500 | |
---|---|---|
committer | 2023-03-09 20:24:52 -0500 | |
commit | efc899d6f193e0cfbecf50a70642912b8e83810d (patch) | |
tree | bbca622c80fda6924df70a680d221b64f61f701d | |
parent | Merge pull request #159 from python-discord/bytes-output (diff) |
Add files output exclude for hidden paths
-rw-r--r-- | snekbox/memfs.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/snekbox/memfs.py b/snekbox/memfs.py index f32fed1..ddea9a9 100644 --- a/snekbox/memfs.py +++ b/snekbox/memfs.py @@ -138,6 +138,11 @@ class MemFS: """ count = 0 for file in self.output.rglob(pattern): + # Ignore hidden directories or files + if any(part.startswith(".") for part in file.parts): + log.info(f"Skipping hidden path {file!s}") + continue + if exclude_files and (orig_time := exclude_files.get(file)): new_time = file.stat().st_mtime log.info(f"Checking {file.name} ({orig_time=}, {new_time=})") |