1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-27 02:08:54 +00:00

Merge pull request #6295 from taandrighetti/fix-dir-hardlinkmasters

diff: reduce memory consumption, fix is_hardlink_master
This commit is contained in:
TW 2022-02-14 18:25:36 +01:00 committed by GitHub
commit fb194baf09
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -990,7 +990,7 @@ def hardlink_master_seen(item):
return 'source' not in item or not hardlinkable(item.mode) or item.source in hardlink_masters return 'source' not in item or not hardlinkable(item.mode) or item.source in hardlink_masters
def is_hardlink_master(item): def is_hardlink_master(item):
return item.get('hardlink_master', True) and 'source' not in item return item.get('hardlink_master', True) and 'source' not in item and hardlinkable(item.mode)
def update_hardlink_masters(item1, item2): def update_hardlink_masters(item1, item2):
if is_hardlink_master(item1) or is_hardlink_master(item2): if is_hardlink_master(item1) or is_hardlink_master(item2):