projects
/
debian
/
tar
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Preserve hard links with --remove-files
[debian/tar]
/
src
/
create.c
diff --git
a/src/create.c
b/src/create.c
index fde7ed171f9d40c64806ffee725c5f053ccafc15..559aaa08b9fc1e55046c1b01a7d403b9a4a59bb8 100644
(file)
--- 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)
{
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;
{
struct link lp;
struct link *duplicate;
@@
-1424,7
+1424,7
@@
file_count_links (struct tar_stat_info *st)
{
if (hard_dereference_option)
return;
{
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)
{
struct link *duplicate;
struct link *lp = xmalloc (offsetof (struct link, name)