X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/8f30d215843a58e159335158dd2e060560479b60..ddc5ae3d9e6cc632b93bac327b6f92d0545b0537:/main.c diff --git a/main.c b/main.c index 649aa904..5a06f177 100644 --- a/main.c +++ b/main.c @@ -70,6 +70,7 @@ extern int sock_f_out; extern int filesfrom_fd; extern int connect_timeout; extern int send_msgs_to_gen; +extern dev_t filesystem_dev; extern pid_t cleanup_child_pid; extern size_t bwlimit_writemax; extern unsigned int module_dirlen; @@ -593,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); } @@ -610,6 +611,7 @@ static char *get_local_name(struct file_list *flist, char *dest_path) full_fname(dest_path)); exit_cleanup(RERR_FILESELECT); } + filesystem_dev = st.st_dev; /* ensures --force works right w/-x */ return NULL; } if (file_total > 1) { @@ -1311,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; @@ -1346,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; } }