diff options
author | Wayne Davison <wayned@samba.org> | 2013-01-19 09:08:36 -0800 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2013-01-19 09:08:39 -0800 |
commit | cee326436c5f2b41c2f10e4e1176cca0a786a368 (patch) | |
tree | 98e71b4681905be832dc8d4ed38a6d7d8fc88989 /generator.c | |
parent | 0ae92567ed5381b3f92266562129aa7adc47025d (diff) | |
download | android_external_rsync-cee326436c5f2b41c2f10e4e1176cca0a786a368.tar.gz android_external_rsync-cee326436c5f2b41c2f10e4e1176cca0a786a368.tar.bz2 android_external_rsync-cee326436c5f2b41c2f10e4e1176cca0a786a368.zip |
Remove -3 return from try_dests_reg() again -- let it do a local copy
when the dest file is unlinked and the hard link fails.
Diffstat (limited to 'generator.c')
-rw-r--r-- | generator.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/generator.c b/generator.c index f95e57f6..e7bb90a4 100644 --- a/generator.c +++ b/generator.c @@ -847,8 +847,7 @@ static int copy_altdest_file(const char *src, const char *dest, struct file_stru * value if we found an alternate basis file. If we're called with the * find_exact_for_existing flag, the destination file already exists, so * we only try to find an exact alt-dest match. In this case, the returns - * can be -2 & -1 (both as above) as well as -3, which means that we - * removed the dest file but failed to create a hard link for it. */ + * are only -2 & -1 (both as above). */ static int try_dests_reg(struct file_struct *file, char *fname, int ndx, char *cmpbuf, stat_x *sxp, int find_exact_for_existing, int itemizing, enum logcode code) @@ -899,11 +898,8 @@ static int try_dests_reg(struct file_struct *file, char *fname, int ndx, } #ifdef SUPPORT_HARD_LINKS if (link_dest) { - if (!hard_link_one(file, fname, cmpbuf, 1)) { - if (find_exact_for_existing) - return -3; + if (!hard_link_one(file, fname, cmpbuf, 1)) goto try_a_copy; - } if (preserve_hard_links && F_IS_HLINKED(file)) finish_hard_link(file, fname, ndx, &sxp->st, itemizing, code, j); if (!maybe_ATTRS_REPORT && (INFO_GTE(NAME, 2) || stdout_format_has_i > 1)) { @@ -1668,9 +1664,6 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx, fnamecmp = fnamecmpbuf; fnamecmp_type = j; statret = 0; - } else if (j == -3) { - statret = -1; - stat_errno = ENOENT; } } |