diff -u rdiff_backup/Hardlink.py rdiff_backup_rev/Hardlink.py --- rdiff_backup/Hardlink.py 2009-03-16 10:36:21.000000000 -0400 +++ rdiff_backup_rev/Hardlink.py 2010-08-16 12:07:08.000000000 -0400 @@ -95,7 +95,13 @@ src_rorp.getnumlinks() == dest_rorp.getnumlinks() == 1): return 1 # Hard links don't apply - if src_rorp.getnumlinks() < dest_rorp.getnumlinks(): return 0 + """The sha1 of linked files is only stored in the metadata of the first + linked file on the dest side. If the first linked file on the src side is + deleted, then the sha1 will also be deleted on the dest side, so we test for this + & report not equal so that another sha1 will be stored with the next linked + file on the dest side""" + if (not islinked(src_rorp) and not dest_rorp.has_sha1()): return 0 + if src_rorp.getnumlinks() != dest_rorp.getnumlinks(): return 0 src_key = get_inode_key(src_rorp) index, remaining, dest_key, digest = _inode_index[src_key] if dest_key == "NA":