summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2011-05-07 12:31:33 -0700
committerWayne Davison <wayned@samba.org>2011-05-07 12:42:16 -0700
commit58663df4323991bde024ffe4436b67e53f56e52b (patch)
tree4aba3144a765bc4d52c78b8e07293ca87712e18f /main.c
parentda7acc5e425e3221a24925b864bec1abbe8d4901 (diff)
downloadrsync-58663df4323991bde024ffe4436b67e53f56e52b.tar.gz
Turn empty remote args into dot dirs.
Diffstat (limited to 'main.c')
-rw-r--r--main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/main.c b/main.c
index de5bc489..16b283cd 100644
--- a/main.c
+++ b/main.c
@@ -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;
}
}