Make daemon-exclude errors more error-like.
[rsync/rsync.git] / generator.c
index 326ccd8..8491300 100644 (file)
@@ -288,7 +288,7 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
        if (allowed_lull)
                maybe_send_keepalive(time(NULL), MSK_ALLOW_FLUSH);
 
-       if (io_error && !ignore_errors) {
+       if (io_error & IOERR_GENERAL && !ignore_errors) {
                if (already_warned)
                        return;
                rprintf(FINFO,
@@ -1178,7 +1178,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                                handle_skipped_hlink(file, itemizing, code, f_out);
 #endif
                        rprintf(FERROR_XFER,
-                               "skipping daemon-excluded %s \"%s\"\n",
+                               "ERROR: daemon refused to receive %s \"%s\"\n",
                                is_dir ? "directory" : "file", fname);
                        if (is_dir)
                                goto skipping_dir_contents;
@@ -1354,6 +1354,14 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                        }
                }
 
+#ifdef SUPPORT_XATTRS
+               if (preserve_xattrs && statret == 1)
+                       copy_xattrs(fnamecmpbuf, fname);
+#endif
+               if (set_file_attrs(fname, file, real_ret ? NULL : &real_sx, NULL, 0)
+                   && INFO_GTE(NAME, 1) && code != FNONE && f_out != -1)
+                       rprintf(code, "%s/\n", fname);
+
                /* We need to ensure that the dirs in the transfer have writable
                 * permissions during the time we are putting files within them.
                 * This is then fixed after the transfer is done. */
@@ -1369,14 +1377,6 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                }
 #endif
 
-#ifdef SUPPORT_XATTRS
-               if (preserve_xattrs && statret == 1)
-                       copy_xattrs(fnamecmpbuf, fname);
-#endif
-               if (set_file_attrs(fname, file, real_ret ? NULL : &real_sx, NULL, 0)
-                   && INFO_GTE(NAME, 1) && code != FNONE && f_out != -1)
-                       rprintf(code, "%s/\n", fname);
-
                if (real_ret != 0 && one_file_system)
                        real_sx.st.st_dev = filesystem_dev;
                if (inc_recurse) {