diff --git a/melamine/shred.py b/melamine/shred.py index cba00bb..a306f9a 100644 --- a/melamine/shred.py +++ b/melamine/shred.py @@ -33,7 +33,13 @@ async def main(job) -> bool: # Get hardlinks to subsequently unlink for all files for path in job.paths: if isinstance(path, ShredFile): - path.hardlinks = set(link async for link in path.fs_handler.get_hardlinks(path)) + logger.info("Getting hardlinks for {path}") + hardlink_count = 0 + path.hardlinks = set() + async for link in path.fs_handler.get_hardlinks(path): + hardlink_count += 1 + path.hardlinks.add(link) + logger.info(f"Found hardlink: {link}") # Shred all physical files including hardlinks for path in job.paths: