X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=src%2Fcreate.c;h=ff0e9d572c5e8606d0bf6a15c6c387bd4201ccd2;hb=f63937ee1182081ec42ac8bfc419666a6b9a0edd;hp=a925160e1be90c5b5b0cab7cc301a3ec3e7135fc;hpb=cf7169a2ede9bb08b71de68fe0c8bbecf827abe6;p=tar diff --git a/src/create.c b/src/create.c index a925160..ff0e9d5 100644 --- a/src/create.c +++ b/src/create.c @@ -744,7 +744,7 @@ write_header_name (struct tar_stat_info *st) 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); @@ -1377,7 +1377,7 @@ static Hash_table *link_table; 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; @@ -1398,7 +1398,7 @@ dump_hard_link (struct tar_stat_info *st) 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; @@ -1461,7 +1461,7 @@ check_links (void) { if (lp->nlink) { - WARN ((0, 0, _("Missing links to %s.\n"), quote (lp->name))); + WARN ((0, 0, _("Missing links to %s."), quote (lp->name))); } } }