From 6c9cca49b9a2a554d82fa04797965c991023f1fc Mon Sep 17 00:00:00 2001 From: Darryl Nixon Date: Sun, 16 Jul 2023 11:26:11 -0700 Subject: [PATCH] Fix hardlink traversal of ShredDir --- melamine/classes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/melamine/classes.py b/melamine/classes.py index c95c012..b4ab46a 100644 --- a/melamine/classes.py +++ b/melamine/classes.py @@ -20,13 +20,13 @@ async def get_all_hardlinks(paths: Set[Path]) -> None: logger.info(f"Getting hardlinks for {path}") hardlink_count = 0 path.hardlinks = set() - async for link in path.fs_handler.get_hardlinks(path): + async for link in path.fs_handler.get_hardlinks(path.absolute_path): hardlink_count += 1 path.hardlinks.add(link) logger.info(f"Found hardlink: {link}") logger.info(f"Found {hardlink_count} hardlinks for {path.absolute_path}") if isinstance(path, ShredDir): - await get_all_hardlinks(path.contents) + path.contents = await get_all_hardlinks(path.contents) return paths