mirror of
https://github.com/DarrylNixon/melamine.git
synced 2024-04-22 06:27:20 -07:00
Improve hardlink logging
This commit is contained in:
parent
5a4d74936b
commit
e60812c136
1 changed files with 7 additions and 1 deletions
|
@ -33,7 +33,13 @@ async def main(job) -> bool:
|
||||||
# Get hardlinks to subsequently unlink for all files
|
# Get hardlinks to subsequently unlink for all files
|
||||||
for path in job.paths:
|
for path in job.paths:
|
||||||
if isinstance(path, ShredFile):
|
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
|
# Shred all physical files including hardlinks
|
||||||
for path in job.paths:
|
for path in job.paths:
|
||||||
|
|
Loading…
Reference in a new issue