We can't decrement the in_progress value for a hard-linked file until
authorWayne Davison <wayned@samba.org>
Thu, 18 Oct 2007 14:04:42 +0000 (14:04 +0000)
committerWayne Davison <wayned@samba.org>
Thu, 18 Oct 2007 14:04:42 +0000 (14:04 +0000)
the generator gets a chance to finish the hard links.

generator.c
io.c

index c10685a..d82fa4a 100644 (file)
@@ -1873,6 +1873,7 @@ void check_for_finished_files(int itemizing, enum logcode code, int check_redo)
                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);
+               flist->in_progress--;
        }
 #endif
 
diff --git a/io.c b/io.c
index 3faf83d..cb485b8 100644 (file)
--- a/io.c
+++ b/io.c
@@ -181,7 +181,6 @@ static void got_flist_entry_status(enum festatus status, const char *buf)
        struct file_list *flist = flist_for_ndx(ndx);
 
        assert(flist != NULL);
-       assert(ndx >= flist->ndx_start);
 
        if (remove_source_files) {
                active_filecnt--;
@@ -197,8 +196,10 @@ static void got_flist_entry_status(enum festatus status, const char *buf)
                        send_msg(MSG_SUCCESS, buf, 4, 0);
                if (preserve_hard_links) {
                        struct file_struct *file = flist->files[ndx - flist->ndx_start];
-                       if (F_IS_HLINKED(file))
+                       if (F_IS_HLINKED(file)) {
                                flist_ndx_push(&hlink_list, ndx);
+                               flist->in_progress++;
+                       }
                }
                break;
        case FES_REDO: