From: Wayne Davison Date: Sun, 10 Feb 2008 06:07:03 +0000 (-0800) Subject: Add a trailing slash to a modname arg that has no path information. X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/commitdiff_plain/d348d5fd5ffb55ccddb11d5428a7a3a3445ce037 Add a trailing slash to a modname arg that has no path information. This ensures that the user gets a "skipping" message if they didn't specify -r or -d. (A trailing-slash was already being added to a lone modname for --list-only transfers.) --- diff --git a/clientserver.c b/clientserver.c index 19c2a257..71cb9791 100644 --- a/clientserver.c +++ b/clientserver.c @@ -245,7 +245,7 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char rprintf(FERROR, "internal: args[] overflowed in do_cmd()\n"); exit_cleanup(RERR_SYNTAX); } - if (list_only && strncmp(*argv, modname, modlen) == 0 + if (strncmp(*argv, modname, modlen) == 0 && argv[0][modlen] == '\0') sargs[sargc++] = modname; /* we send "modname/" */ else