Commit 250a848e authored by dgaudet's avatar dgaudet

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@587 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 8af9b037
......@@ -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
......
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