From ef6a2cecc4d22fcc4ae865c980a57304355477df Mon Sep 17 00:00:00 2001 From: Darryl Nixon Date: Sun, 16 Jul 2023 15:12:46 -0700 Subject: [PATCH] i'm a dunce --- melamine/shred.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/melamine/shred.py b/melamine/shred.py index 2f9ba2a..45e211a 100644 --- a/melamine/shred.py +++ b/melamine/shred.py @@ -78,7 +78,8 @@ 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 mount_point == "/": + if str(mount_point) == "/": + logger.info("Root filesystem mount seen, skipping /proc, /dev, and /sys") async for item in mount_point.glob("*"): if await item.is_dir(): if str(item) in IGNORE_GLOBAL: @@ -90,6 +91,7 @@ async def main(job: argparse.Namespace) -> bool: else: tasks.append(check_inode_and_unlink(item, inodes)) else: + logger.info(f"Checking non-root filesystem mount: {str(mount_point)}") async for item in mount_point.rglob("*"): if any(str(item).startswith(str(path)) for path in job.ignoredir): continue