X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/f3af206d8db24ec5d9960a6aa01c2b97c80d9eda..e0391f8149c1dfe9bfa8660c7825e94fe7c4228a:/backup.c diff --git a/backup.c b/backup.c index c1b80834..a4572d39 100644 --- a/backup.c +++ b/backup.c @@ -25,7 +25,6 @@ extern int backup_suffix_len; extern int backup_dir_len; extern char *backup_suffix; extern char *backup_dir; -extern struct file_struct **hlink_list; extern int am_root; extern int preserve_devices; @@ -189,6 +188,7 @@ static int keep_backup(char *fname) backup_dir[--backup_dir_len] = '\0'; if (verbose > 0) rprintf(FINFO, "backup_dir is %s\n", backup_dir); + initialised = 1; } @@ -199,7 +199,7 @@ static int keep_backup(char *fname) if (do_stat(fname, &st)) return 1; #endif - file = make_file(fname, NO_EXCLUDES); + file = make_file(fname, NULL, NO_EXCLUDES); /* the file could have disappeared */ if (!file) return 1; @@ -263,11 +263,6 @@ 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 && !S_ISREG(file->mode)) { rprintf(FINFO, "make_bak: skipping non-regular file %s\n", @@ -282,7 +277,7 @@ static int keep_backup(char *fname) } } set_perms(keep_name, file, NULL, 0); - free_file(file, FREE_STRUCT); + free(file); if (verbose > 1) rprintf(FINFO, "keep_backup %s -> %s\n", fname, keep_name);