summaryrefslogtreecommitdiff
path: root/rdiff-backup/rdiff_backup/rpath.py
diff options
context:
space:
mode:
authorbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2003-04-06 02:56:34 +0000
committerbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2003-04-06 02:56:34 +0000
commit9446f83a0d8e699e6d5953c415781a122d90ac87 (patch)
treedd1e0bac22be95479b266c060c47e97c96c50e1a /rdiff-backup/rdiff_backup/rpath.py
parentf2a81b8612ef203367f29d9c3e669c74ea41b009 (diff)
downloadrdiff-backup-9446f83a0d8e699e6d5953c415781a122d90ac87.tar.gz
Make no preserve hard links disable inode comparison
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@314 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/rdiff_backup/rpath.py')
-rw-r--r--rdiff-backup/rdiff_backup/rpath.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/rdiff-backup/rdiff_backup/rpath.py b/rdiff-backup/rdiff_backup/rpath.py
index da7a518..cea2e4b 100644
--- a/rdiff-backup/rdiff_backup/rpath.py
+++ b/rdiff-backup/rdiff_backup/rpath.py
@@ -157,7 +157,7 @@ def copy_attribs(rpin, rpout):
check_for_files(rpin, rpout)
if rpin.issym(): return # symlinks have no valid attributes
if Globals.change_ownership: apply(rpout.chown, rpin.getuidgid())
- if Globals.change_permission: rpout.chmod(rpin.getperms())
+ if Globals.change_permissions: rpout.chmod(rpin.getperms())
if not rpin.isdev(): rpout.setmtime(rpin.getmtime())
def cmp_attribs(rp1, rp2):
@@ -266,12 +266,14 @@ class RORPath:
if (key == 'uid' or key == 'gid') and self.issym():
# Don't compare gid/uid for symlinks
pass
+ elif key == 'perms' and not Globals.change_permissions: pass
elif key == 'atime' and not Globals.preserve_atime: pass
elif key == 'devloc' or key == 'nlink': pass
elif key == 'size' and not self.isreg(): pass
elif (key == 'inode' and
(not self.isreg() or self.getnumlinks() == 1 or
- not Globals.compare_inode)): pass
+ not Globals.compare_inode or
+ not Globals.preserve_hardlinks)): pass
elif (not other.data.has_key(key) or
self.data[key] != other.data[key]): return None
return 1
@@ -298,6 +300,7 @@ class RORPath:
elif key == 'atime' and not Globals.preserve_atime: pass
elif key == 'devloc' or key == 'nlink': pass
elif key == 'size' and not self.isreg(): pass
+ elif key == 'perms' and not Globals.change_permissions: pass
elif key == 'inode': pass
elif (not other.data.has_key(key) or
self.data[key] != other.data[key]): return 0
@@ -315,6 +318,7 @@ class RORPath:
(self.issym() or not compare_ownership)):
# Don't compare gid/uid for symlinks, or if told not to
pass
+ elif key == 'perms' and not Globals.change_permissions: pass
elif key == 'atime' and not Globals.preserve_atime: pass
elif key == 'devloc' or key == 'nlink': pass
elif key == 'size' and not self.isreg(): pass