- rprintf(FERROR, "keep_backup failed: %s -> \"%s\": %s\n",
- full_fname(fname), backup_dir_buf, strerror(errno));
+ rsyserr(FERROR, errno, "keep_backup failed: %s -> \"%s\"",
+ full_fname(fname), backup_dir_buf);
+ } else if (st.st_nlink > 1) {
+ /* If someone has hard-linked the file into the backup
+ * dir, rename() can return success but do nothing! */
+ robust_unlink(fname); /* Just in case... */