Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Turn empty remote args into dot dirs.
[rsync/rsync.git]
/
main.c
diff --git
a/main.c
b/main.c
index
de5bc48
..
16b283c
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-1313,6
+1313,9
@@
static int start_client(int argc, char *argv[])
remote_argc = argc = 1;
}
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;
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);
}
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;
}
}
remote_argv[i] = arg;
}
}