Make daemon-exclude errors more error-like.
[rsync/rsync.git] / main.c
diff --git a/main.c b/main.c
index de5bc48..5a06f17 100644 (file)
--- a/main.c
+++ b/main.c
@@ -594,7 +594,7 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
                if ((*dest_path != '.' || dest_path[1] != '\0')
                 && (check_filter(&daemon_filter_list, FLOG, dest_path, 0) < 0
                  || check_filter(&daemon_filter_list, FLOG, dest_path, 1) < 0)) {
-                       rprintf(FERROR, "skipping daemon-excluded destination \"%s\"\n",
+                       rprintf(FERROR, "ERROR: daemon has excluded destination \"%s\"\n",
                                dest_path);
                        exit_cleanup(RERR_FILESELECT);
                }
@@ -1313,6 +1313,9 @@ static int start_client(int argc, char *argv[])
                remote_argc = argc = 1;
        }
 
+       if (!rsync_port && remote_argc && !**remote_argv) /* Turn an empty arg into a dot dir. */
+               *remote_argv = ".";
+
        if (am_sender) {
                char *dummy_host;
                int dummy_port = rsync_port;
@@ -1348,6 +1351,8 @@ static int start_client(int argc, char *argv[])
                                        rprintf(FERROR, "All source args must use the same port number.\n");
                                exit_cleanup(RERR_SYNTAX);
                        }
+                       if (!rsync_port && !*arg) /* Turn an empty arg into a dot dir. */
+                               arg = ".";
                        remote_argv[i] = arg;
                }
        }