Turn empty remote args into dot dirs.

This commit is contained in:
Wayne Davison committed 2011-05-07 12:42:16 -07:00
1 parent da7acc5e42
commit 58663df432
1 file changed
+5
+5
View File
@@ -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;
}
}