3 I run one of the debian mirrors, and I had to write this patch because
4 my archive is split between more than one disk. Would you accept a more
5 polished version of this patch for inclusion in rsync?
7 To use this patch, run these commands for a successful build:
9 patch -p1 <patches/soften-links.diff
10 ./configure (optional if already run)
13 based-on: c225330aaf9d6032a79317bda1bf669e90ac7212
14 diff --git a/syscall.c b/syscall.c
17 @@ -123,9 +123,14 @@ ssize_t do_readlink(const char *path, char *buf, size_t bufsiz)
19 int do_link(const char *old_path, const char *new_path)
23 if (dry_run) return 0;
24 RETURN_ERROR_IF_RO_OR_LO;
25 - return link(old_path, new_path);
26 + st = link(old_path, new_path);
27 + if (/*soften_links &&*/ st != 0 && errno == EXDEV)
28 + st = symlink(old_path, new_path);