} else {
rprintf(FERROR,
"internal: try_dests_non() called with invalid mode (%o)\n",
- file->mode);
+ (int)file->mode);
exit_cleanup(RERR_UNSUPPORTED);
}
if (link_dest
&& !IS_SPECIAL(file->mode) && !IS_DEVICE(file->mode)
#endif
) {
- if (do_link(fnamebuf, fname) < 0) {
+#ifdef SUPPORT_HARD_LINKS
+ if (do_link(fnamebuf, fname) < 0)
+#endif
+ {
rsyserr(FERROR, errno,
"failed to hard-link %s with %s",
fnamebuf, fname);
char *dn = file->dirname ? file->dirname : ".";
if (parent_dirname != dn && strcmp(parent_dirname, dn) != 0) {
if (relative_paths && !implied_dirs
- && do_stat(dn, &st) < 0
+ && safe_stat(dn, &st) < 0
&& create_directory_path(fname) < 0) {
rsyserr(FERROR, errno,
"recv_generator: mkdir %s failed",