diff options
author | Wayne Davison <wayned@samba.org> | 2011-05-07 12:31:33 -0700 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2011-05-07 12:42:16 -0700 |
commit | 58663df4323991bde024ffe4436b67e53f56e52b (patch) | |
tree | 4aba3144a765bc4d52c78b8e07293ca87712e18f /main.c | |
parent | da7acc5e425e3221a24925b864bec1abbe8d4901 (diff) | |
download | rsync-58663df4323991bde024ffe4436b67e53f56e52b.tar.gz |
Turn empty remote args into dot dirs.
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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; } } |