Merge pull request #692 from OMEGARAZER/hardlink_to

This commit is contained in:
Serene
2022-11-09 09:55:54 +10:00
committed by GitHub

View File

@@ -114,6 +114,9 @@ class RedditDownloader(RedditConnector):
f'Resource hash {resource_hash} from submission {submission.id} downloaded elsewhere')
return
elif self.args.make_hard_links:
try:
destination.hardlink_to(self.master_hash_list[resource_hash])
except AttributeError:
self.master_hash_list[resource_hash].link_to(destination)
logger.info(
f'Hard link made linking {destination} to {self.master_hash_list[resource_hash]}'