summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorowsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2008-06-14 18:17:57 +0000
committerowsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2008-06-14 18:17:57 +0000
commit79ddd7871a7237ff63cbaf076339e44bf502ee1f (patch)
treeedb2a22cbd257c5151015b61c2e5c8cc822cfc3b
parentc4ecd2ca8b35800a61b724a784394fb828bbc11e (diff)
downloadrdiff-backup-79ddd7871a7237ff63cbaf076339e44bf502ee1f.tar.gz
We should preserve hardlinks even when the destination file system does
not support them. git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@896 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
-rw-r--r--rdiff-backup/CHANGELOG3
-rw-r--r--rdiff-backup/rdiff_backup/fs_abilities.py2
-rw-r--r--rdiff-backup/rdiff_backup/metadata.py2
3 files changed, 5 insertions, 2 deletions
diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG
index a8b1f53..101611d 100644
--- a/rdiff-backup/CHANGELOG
+++ b/rdiff-backup/CHANGELOG
@@ -1,6 +1,9 @@
New in v1.1.16 (????/??/??)
---------------------------
+Properly preserve hard links when the destination does not support them.
+Thanks to Andreas Olsson for noticing the problem. (Andrew Ferguson)
+
Fix another case where rdiff-backup fails because it has insufficient
permissions on a file it owns. Thanks to Peter Schuller for the test
case. (Andrew Ferguson)
diff --git a/rdiff-backup/rdiff_backup/fs_abilities.py b/rdiff-backup/rdiff_backup/fs_abilities.py
index cf7c88c..9d125b1 100644
--- a/rdiff-backup/rdiff_backup/fs_abilities.py
+++ b/rdiff-backup/rdiff_backup/fs_abilities.py
@@ -188,7 +188,7 @@ class FSAbilities:
if Globals.preserve_hardlinks != 0:
log.Log("Warning: hard linking not supported by filesystem "
"at %s" % (self.root_rp.path,), 3)
- self.hardlinks = 0
+ self.hardlinks = None
else: self.hardlinks = 1
def set_fsync_dirs(self, testdir):
diff --git a/rdiff-backup/rdiff_backup/metadata.py b/rdiff-backup/rdiff_backup/metadata.py
index b830a2e..c20092b 100644
--- a/rdiff-backup/rdiff_backup/metadata.py
+++ b/rdiff-backup/rdiff_backup/metadata.py
@@ -116,7 +116,7 @@ def RORP2Record(rorpath):
str_list.append(" CarbonFile %s\n" % (cfile,))
# If file is hardlinked, add that information
- if Globals.preserve_hardlinks:
+ if Globals.preserve_hardlinks != 0:
numlinks = rorpath.getnumlinks()
if numlinks > 1:
str_list.append(" NumHardLinks %s\n" % numlinks)