return write_short_name (st);
}
else if (NAME_FIELD_SIZE - (archive_format == OLDGNU_FORMAT)
- < strlen (st->file_name))
+ <= strlen (st->file_name))
return write_long_name (st);
else
return write_short_name (st);
static bool
dump_hard_link (struct tar_stat_info *st)
{
- if (link_table && st->stat.st_nlink > 1)
+ if (link_table && (st->stat.st_nlink > 1 || remove_files_option))
{
struct link lp;
struct link *duplicate;
block_ordinal = current_block_ordinal ();
assign_string (&st->link_name, link_name);
if (NAME_FIELD_SIZE - (archive_format == OLDGNU_FORMAT)
- < strlen (link_name))
+ <= strlen (link_name))
write_long_link (st);
st->stat.st_size = 0;
{
if (hard_dereference_option)
return;
- if (st->stat.st_nlink > 1)
+ if (st->stat.st_nlink > 1 || remove_files_option)
{
struct link *duplicate;
struct link *lp = xmalloc (offsetof (struct link, name)