diff options
author | Wayne Davison <wayned@samba.org> | 2011-07-04 16:02:12 -0700 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2011-07-04 16:13:45 -0700 |
commit | 03cd1ae4fadb716dd1fb67971cb82bd432988fe8 (patch) | |
tree | 80829cb6d1be2ff98b33194147bd35e0fc6266ef /generator.c | |
parent | 01580c794a40bb89c40ba03c2d73d640a28bd292 (diff) | |
download | android_external_rsync-03cd1ae4fadb716dd1fb67971cb82bd432988fe8.tar.gz android_external_rsync-03cd1ae4fadb716dd1fb67971cb82bd432988fe8.tar.bz2 android_external_rsync-03cd1ae4fadb716dd1fb67971cb82bd432988fe8.zip |
Handle FES_NO_SEND properly on a hard-linked file.
Fixes bug 8246.
Diffstat (limited to 'generator.c')
-rw-r--r-- | generator.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/generator.c b/generator.c index e24f20fb..631a559e 100644 --- a/generator.c +++ b/generator.c @@ -2009,10 +2009,16 @@ void check_for_finished_files(int itemizing, enum logcode code, int check_redo) while (1) { #ifdef SUPPORT_HARD_LINKS if (preserve_hard_links && (ndx = get_hlink_num()) != -1) { + int send_failed = (ndx == -2); + if (send_failed) + ndx = get_hlink_num(); flist = flist_for_ndx(ndx, "check_for_finished_files.1"); file = flist->files[ndx - flist->ndx_start]; assert(file->flags & FLAG_HLINKED); - finish_hard_link(file, f_name(file, fbuf), ndx, NULL, itemizing, code, -1); + if (send_failed) + handle_skipped_hlink(file, itemizing, code, sock_f_out); + else + finish_hard_link(file, f_name(file, fbuf), ndx, NULL, itemizing, code, -1); flist->in_progress--; continue; } |