Simplified test for hardlink in make_backup debug message to
authorJ.W. Schultz <jw@samba.org>
Tue, 10 Feb 2004 23:23:09 +0000 (23:23 +0000)
committerJ.W. Schultz <jw@samba.org>
Tue, 10 Feb 2004 23:23:09 +0000 (23:23 +0000)
avoid core-dump.

backup.c

index 248ae90..9765d6f 100644 (file)
--- a/backup.c
+++ b/backup.c
@@ -264,11 +264,8 @@ static int keep_backup(char *fname)
                kept = 1;
        }
 #endif
-       if (!kept && preserve_hard_links && file->link_u.links
-           && hlink_list[file->F_HLINDEX] != file) {
-               if (verbose > 1)
-                       rprintf(FINFO, "%s is a hard link\n", f_name(file));
-       }
+       if (!kept && preserve_hard_links && file->link_u.links && verbose > 1)
+               rprintf(FINFO, "%s was a hard link\n", f_name(file));
 
        if (!kept && !S_ISREG(file->mode)) {
                rprintf(FINFO, "make_bak: skipping non-regular file %s\n",