diff options
-rw-r--r-- | backup.c | 3 | ||||
-rw-r--r-- | generator.c | 2 |
2 files changed, 3 insertions, 2 deletions
@@ -265,7 +265,8 @@ static int keep_backup(char *fname) kept = 1; } #endif - if (!kept && preserve_hard_links && check_hard_link(file)) { + if (!kept && preserve_hard_links && file->link_u.links + && file->F_HEAD != file) { if (verbose > 1) rprintf(FINFO, "%s is a hard link\n", f_name(file)); } diff --git a/generator.c b/generator.c index da532239..5126f281 100644 --- a/generator.c +++ b/generator.c @@ -397,7 +397,7 @@ void recv_generator(char *fname, struct file_struct *file, int i, int f_out) } #endif - if (preserve_hard_links && check_hard_link(file)) { + if (preserve_hard_links && file->link_u.links && file->F_HEAD != file) { if (verbose > 1) { rprintf(FINFO, "recv_generator: \"%s\" is a hard link\n", f_name(file)); |