summaryrefslogtreecommitdiff
path: root/backup.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2004-01-12 03:50:07 +0000
committerWayne Davison <wayned@samba.org>2004-01-12 03:50:07 +0000
commitaa23c22004546539780a068a511492bf7e51c4ea (patch)
tree1023cbe3bcbaa61f6f08d4eb3e29b34d7443867f /backup.c
parent1d5cda2265365974eb70797d74e4a34d0ca7729d (diff)
downloadrsync-aa23c22004546539780a068a511492bf7e51c4ea.tar.gz
rsync-aa23c22004546539780a068a511492bf7e51c4ea.tar.bz2
rsync-aa23c22004546539780a068a511492bf7e51c4ea.zip
Changed the hard-link check.
Diffstat (limited to 'backup.c')
-rw-r--r--backup.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/backup.c b/backup.c
index 90676f98..dd1b3dd0 100644
--- a/backup.c
+++ b/backup.c
@@ -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));
}