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 /io.c | |
parent | 01580c794a40bb89c40ba03c2d73d640a28bd292 (diff) | |
download | rsync-03cd1ae4fadb716dd1fb67971cb82bd432988fe8.tar.gz |
Handle FES_NO_SEND properly on a hard-linked file.
Fixes bug 8246.
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -1032,13 +1032,19 @@ static void got_flist_entry_status(enum festatus status, int ndx) case FES_SUCCESS: if (remove_source_files) send_msg_int(MSG_SUCCESS, ndx); + /* FALL THROUGH */ + case FES_NO_SEND: +#ifdef SUPPORT_HARD_LINKS if (preserve_hard_links) { struct file_struct *file = flist->files[ndx - flist->ndx_start]; if (F_IS_HLINKED(file)) { + if (status == FES_NO_SEND) + flist_ndx_push(&hlink_list, -2); /* indicates a failure follows */ flist_ndx_push(&hlink_list, ndx); flist->in_progress++; } } +#endif break; case FES_REDO: if (read_batch) { @@ -1050,8 +1056,6 @@ static void got_flist_entry_status(enum festatus status, int ndx) flist->to_redo++; flist_ndx_push(&redo_list, ndx); break; - case FES_NO_SEND: - break; } } |