X-Git-Url: https://git.cworth.org/git?p=tar;a=blobdiff_plain;f=src%2Fcreate.c;h=559aaa08b9fc1e55046c1b01a7d403b9a4a59bb8;hp=fde7ed171f9d40c64806ffee725c5f053ccafc15;hb=f1ed85d46043c523cd5b8196c1d266f3606a2531;hpb=a39751e44721377bf30522e2fe278051daa3cee1 diff --git a/src/create.c b/src/create.c index fde7ed1..559aaa0 100644 --- a/src/create.c +++ b/src/create.c @@ -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; @@ -1424,7 +1424,7 @@ file_count_links (struct tar_stat_info *st) { 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)