diff --git a/melamine/shred.py b/melamine/shred.py index af5237e..d027dc0 100644 --- a/melamine/shred.py +++ b/melamine/shred.py @@ -63,7 +63,8 @@ async def main(job: argparse.Namespace) -> bool: async def check_inode_and_unlink(item, inodes): async with semaphore: - if await item.stat().st_ino in inodes: + stat = await item.stat() + if await stat.st_ino in inodes: log_buf = f"Deleting hardlink: {item.path}" if not job.dryrun: log_buf = "DRY RUN " + log_buf @@ -78,6 +79,7 @@ async def main(job: argparse.Namespace) -> bool: check_paths = [mount_point / path for path in ("/proc", "/dev", "/sys")] manual_process = any(asyncio.gather(*[path.exists() for path in check_paths])) if manual_process: + logger.warning("Us") # Traverse every directory in mount_point recursively except /proc, /dev, and /sys async for item in mount_point.glob("*"): if await item.is_dir():