From 56ac2124ac4dce39b6521991691cbeddf885b0e5 Mon Sep 17 00:00:00 2001 From: dgaudet Date: Sun, 19 Jun 2005 19:47:56 +0000 Subject: cmp_attribs (used in testing only) is failing on symlinks and devices because ctime isn't set. reorder the if statement so that ctime is suppressed like mtime already was for sym/dev. git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@587 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109 --- rdiff-backup/rdiff_backup/rpath.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rdiff-backup/rdiff_backup/rpath.py b/rdiff-backup/rdiff_backup/rpath.py index c383d03..e672b28 100644 --- a/rdiff-backup/rdiff_backup/rpath.py +++ b/rdiff-backup/rdiff_backup/rpath.py @@ -197,12 +197,13 @@ def cmp_attribs(rp1, rp2): if Globals.change_ownership and rp1.getuidgid() != rp2.getuidgid(): result = None elif rp1.getperms() != rp2.getperms(): result = None - elif rp1.getctime() != rp2.getctime(): result = None elif rp1.issym() and rp2.issym(): # Don't check times for some types result = 1 elif rp1.isblkdev() and rp2.isblkdev(): result = 1 elif rp1.ischardev() and rp2.ischardev(): result = 1 - else: result = (rp1.getmtime() == rp2.getmtime()) + else: + result = ((rp1.getctime() == rp2.getctime()) and + (rp1.getmtime() == rp2.getmtime())) log.Log("Compare attribs of %s and %s: %s" % (rp1.get_indexpath(), rp2.get_indexpath(), result), 7) return result -- cgit v1.2.1