From b710595271d6ecf393e1a7c4366551d7fbbb84fc Mon Sep 17 00:00:00 2001 From: Darryl Nixon Date: Sun, 16 Jul 2023 14:46:15 -0700 Subject: [PATCH] manually process --- melamine/shred.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/melamine/shred.py b/melamine/shred.py index 6c98b1a..0fd4a59 100644 --- a/melamine/shred.py +++ b/melamine/shred.py @@ -75,7 +75,9 @@ async def main(job: argparse.Namespace) -> bool: tasks = [] # scandir/glob/rglob doesn't play nice with FileNotFound errors, # so let's avoid them entirely for now in /proc, /dev, and /sys - if any(await (mount_point / path).exists() for path in ("/proc", "/dev", "/sys")): + check_paths = [mount_point / path for path in ("/proc", "/dev", "/sys")] + manual_process = any(await path.exists() for path in check_paths) + if manual_process: # Traverse every directory in mount_point recursively except /proc, /dev, and /sys async for item in mount_point.glob("*"): if await item.is_dir():