From: Andrew Tridgell Date: Thu, 19 Nov 1998 06:45:21 +0000 (+0000) Subject: improved the "refuse options" code a bit X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/commitdiff_plain/055af776668c0878dd830f82d4bc6ca6aaca8e7a?ds=sidebyside improved the "refuse options" code a bit --- diff --git a/options.c b/options.c index 6fa59636..482f85e6 100644 --- a/options.c +++ b/options.c @@ -236,7 +236,8 @@ static int check_refuse_options(char *ref, int opt) len = strlen(name); while ((p = strstr(ref,name))) { - if (p[len] == ' ' || p[len] == 0) { + if ((p==ref || p[-1]==' ') && + (p[len] == ' ' || p[len] == 0)) { slprintf(err_buf,sizeof(err_buf), "The '%s' option is not supported by this server\n", name); return 1;