mirror of
https://github.com/DarrylNixon/melamine.git
synced 2024-04-22 06:27:20 -07:00
Fix hardlink traversal of ShredDir
This commit is contained in:
parent
c6d797295f
commit
6c9cca49b9
1 changed files with 2 additions and 2 deletions
|
@ -20,13 +20,13 @@ async def get_all_hardlinks(paths: Set[Path]) -> None:
|
||||||
logger.info(f"Getting hardlinks for {path}")
|
logger.info(f"Getting hardlinks for {path}")
|
||||||
hardlink_count = 0
|
hardlink_count = 0
|
||||||
path.hardlinks = set()
|
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
|
hardlink_count += 1
|
||||||
path.hardlinks.add(link)
|
path.hardlinks.add(link)
|
||||||
logger.info(f"Found hardlink: {link}")
|
logger.info(f"Found hardlink: {link}")
|
||||||
logger.info(f"Found {hardlink_count} hardlinks for {path.absolute_path}")
|
logger.info(f"Found {hardlink_count} hardlinks for {path.absolute_path}")
|
||||||
if isinstance(path, ShredDir):
|
if isinstance(path, ShredDir):
|
||||||
await get_all_hardlinks(path.contents)
|
path.contents = await get_all_hardlinks(path.contents)
|
||||||
return paths
|
return paths
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue