- else
- for (size = current_stat.st_size; size > 0; )
- {
- if (multi_volume_option)
- {
- assign_string (&save_name, current_file_name);
- save_totsize = current_stat.st_size;
- save_sizeleft = size;
- }
-
- /* Locate data, determine max length writeable, write it,
- block that we have used the data, then check if the write
- worked. */
-
- data_block = find_next_block ();
- if (! data_block)
- {
- ERROR ((0, 0, _("Unexpected EOF in archive")));
- break; /* FIXME: What happens, then? */
- }
-
- written = available_space_after (data_block);
-
- if (written > size)
- written = size;
- errno = 0;
- count = full_write (fd, data_block->buffer, written);
- size -= count;
-
- set_next_block_after ((union block *)
- (data_block->buffer + written - 1));
- if (count != written)
- {
- write_error_details (CURRENT_FILE_NAME, count, written);
- break;
- }
- }
+ p->change_dir = chdir_current;
+ p->sources = xmalloc (offsetof (struct string_list, string)
+ + strlen (file_name) + 1);
+ p->sources->next = 0;
+ strcpy (p->sources->string, file_name);
+ strcpy (p->target, current_stat_info.link_name);
+
+ h = delayed_set_stat_head;
+ if (h && ! h->after_links
+ && strncmp (file_name, h->file_name, h->file_name_len) == 0
+ && ISSLASH (file_name[h->file_name_len])
+ && (last_component (file_name) == file_name + h->file_name_len + 1))
+ {
+ do
+ {
+ h->after_links = 1;
+
+ if (stat (h->file_name, &st) != 0)
+ stat_error (h->file_name);
+ else
+ {
+ h->dev = st.st_dev;
+ h->ino = st.st_ino;
+ }
+ }
+ while ((h = h->next) && ! h->after_links);
+ }
+
+ return 0;
+ }
+
+ return -1;
+}