Commit a4de9194 authored by owsla's avatar owsla

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@896 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 6f0a0751
New in v1.1.16 (????/??/??) 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 Fix another case where rdiff-backup fails because it has insufficient
permissions on a file it owns. Thanks to Peter Schuller for the test permissions on a file it owns. Thanks to Peter Schuller for the test
case. (Andrew Ferguson) case. (Andrew Ferguson)
......
...@@ -188,7 +188,7 @@ class FSAbilities: ...@@ -188,7 +188,7 @@ class FSAbilities:
if Globals.preserve_hardlinks != 0: if Globals.preserve_hardlinks != 0:
log.Log("Warning: hard linking not supported by filesystem " log.Log("Warning: hard linking not supported by filesystem "
"at %s" % (self.root_rp.path,), 3) "at %s" % (self.root_rp.path,), 3)
self.hardlinks = 0 self.hardlinks = None
else: self.hardlinks = 1 else: self.hardlinks = 1
def set_fsync_dirs(self, testdir): def set_fsync_dirs(self, testdir):
......
...@@ -116,7 +116,7 @@ def RORP2Record(rorpath): ...@@ -116,7 +116,7 @@ def RORP2Record(rorpath):
str_list.append(" CarbonFile %s\n" % (cfile,)) str_list.append(" CarbonFile %s\n" % (cfile,))
# If file is hardlinked, add that information # If file is hardlinked, add that information
if Globals.preserve_hardlinks: if Globals.preserve_hardlinks != 0:
numlinks = rorpath.getnumlinks() numlinks = rorpath.getnumlinks()
if numlinks > 1: if numlinks > 1:
str_list.append(" NumHardLinks %s\n" % numlinks) str_list.append(" NumHardLinks %s\n" % numlinks)
......
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