Commit ed018f06 authored by dgaudet's avatar dgaudet

bug#13475: correct an UpdateError when backing up hardlinks with EAs

and/or ACLs.

i have to admit to not being 100% certain of this fix -- because i'm not
sure how to track down all the other users of __eq__ in this two classes to
make sure my change makes sense in all contexts.  it works in my testing
though.


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@594 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 7612e557
......@@ -16,6 +16,9 @@ bug#13476: must always compare device numbers when we compare inode
numbers -- fix a non-fatal problem with hardlinks when a filesystem is
moved to another device (and the inodes don't change).
bug#13475: correct an UpdateError when backing up hardlinks with EAs
and/or ACLs.
New in v0.13.6 (2005/04/07)
---------------------------
......
......@@ -47,9 +47,9 @@ class ExtendedAttributes:
else: self.attr_dict = attr_dict
def __eq__(self, ea):
"""Equal if all attributes and index are equal"""
"""Equal if all attributes are equal"""
assert isinstance(ea, ExtendedAttributes)
return ea.index == self.index and ea.attr_dict == self.attr_dict
return ea.attr_dict == self.attr_dict
def __ne__(self, ea): return not self.__eq__(ea)
def get_indexpath(self): return self.index and '/'.join(self.index) or '.'
......@@ -292,7 +292,6 @@ class AccessControlLists:
"""
assert isinstance(acl, self.__class__)
if self.index != acl.index: return 0
if self.is_basic(): return acl.is_basic()
return (self.cmp_entry_list(self.entry_list, acl.entry_list) and
self.cmp_entry_list(self.default_entry_list,
......@@ -302,9 +301,6 @@ class AccessControlLists:
def eq_verbose(self, acl):
"""Returns same as __eq__ but print explanation if not equal"""
if self.index != acl.index:
print "index %s not equal to index %s" % (self.index, acl.index)
return 0
if not self.cmp_entry_list(self.entry_list, acl.entry_list):
print "ACL entries for %s compare differently" % (self.index,)
return 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment