summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2005-12-12 01:15:22 +0000
committerbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2005-12-12 01:15:22 +0000
commita446d54bcefa21ac07d0db6b615034e945b95b44 (patch)
tree2adfafbcb43d245d8d44c284e5f00614ca49e5ea
parentafbb4426aa4c746f8f641dc920773e94be3e179d (diff)
downloadrdiff-backup-a446d54bcefa21ac07d0db6b615034e945b95b44.tar.gz
false negative acl compare fix
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@702 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
-rw-r--r--rdiff-backup/CHANGELOG3
-rw-r--r--rdiff-backup/rdiff_backup/eas_acls.py2
-rw-r--r--rdiff-backup/testing/eas_aclstest.py12
3 files changed, 16 insertions, 1 deletions
diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG
index 7e510cf..a425b50 100644
--- a/rdiff-backup/CHANGELOG
+++ b/rdiff-backup/CHANGELOG
@@ -4,6 +4,9 @@ New in v1.1.4 (????/??/??)
Quoting should be enabled only as needed between case-sensitive and
non-case-sensitive systems (thanks for Andrew Ferguson for report).
+Files with ACLs will not be unnecessarily marked as changed (bug
+report by Carsten Lorenz).
+
New in v1.1.3 (2005/11/25)
--------------------------
diff --git a/rdiff-backup/rdiff_backup/eas_acls.py b/rdiff-backup/rdiff_backup/eas_acls.py
index abb0d1e..e346a19 100644
--- a/rdiff-backup/rdiff_backup/eas_acls.py
+++ b/rdiff-backup/rdiff_backup/eas_acls.py
@@ -271,7 +271,7 @@ class AccessControlLists:
def cmp_entry_list(self, l1, l2):
"""True if the lists have same entries. Assume preordered"""
- if not l1: return l1 == l2
+ if not l1: return not l2
if not l2 or len(l1) != len(l2): return 0
for i in range(len(l1)):
type1, namepair1, perms1 = l1[i]
diff --git a/rdiff-backup/testing/eas_aclstest.py b/rdiff-backup/testing/eas_aclstest.py
index 0fc3a37..09bfa75 100644
--- a/rdiff-backup/testing/eas_aclstest.py
+++ b/rdiff-backup/testing/eas_aclstest.py
@@ -496,6 +496,18 @@ other::---""")
else: assert 0, "Above should have exited with fatal error"
Globals.never_drop_acls = None
+ def test_nochange(self):
+ """Make sure files with ACLs not unnecessarily flagged changed"""
+ self.make_temp()
+ self.make_backup_dirs()
+ rdiff_backup(1, 1, self.acl_testdir1.path, tempdir.path,
+ current_time = 10000)
+ rdiff_backup(1, 1, self.acl_testdir1.path, tempdir.path,
+ current_time = 20000)
+ incdir = tempdir.append('rdiff-backup-data').append('increments')
+ assert incdir.isdir(), incdir
+ assert not incdir.listdir(), incdir.listdir()
+
class CombinedTest(unittest.TestCase):
"""Test backing up and restoring directories with both EAs and ACLs"""