]> git.cworth.org Git - tar/blobdiff - src/create.c
use a maintainer version number
[tar] / src / create.c
index a925160e1be90c5b5b0cab7cc301a3ec3e7135fc..ff0e9d572c5e8606d0bf6a15c6c387bd4201ccd2 100644 (file)
@@ -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)));
        }
     }
 }