From aa7a6e878bf09d81122bb29b32deab2966c74b61 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Mon, 14 Mar 2005 17:30:13 +0000 Subject: [PATCH] The "recurse" value is back to being just 1 or 0 (true or false). --- options.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/options.c b/options.c index cb9bbafe..a9f4c2d7 100644 --- a/options.c +++ b/options.c @@ -415,7 +415,7 @@ static struct poptOption long_options[] = { {"archive", 'a', POPT_ARG_NONE, &archive_mode, 0, 0, 0 }, {"server", 0, POPT_ARG_NONE, &am_server, 0, 0, 0 }, {"sender", 0, POPT_ARG_NONE, 0, OPT_SENDER, 0, 0 }, - {"recursive", 'r', POPT_ARG_VAL, &recurse, -1, 0, 0 }, + {"recursive", 'r', POPT_ARG_NONE, &recurse, 0, 0, 0 }, {"list-only", 0, POPT_ARG_VAL, &list_only, 2, 0, 0 }, {"relative", 'R', POPT_ARG_VAL, &relative_paths, 1, 0, 0 }, {"no-relative", 0, POPT_ARG_VAL, &relative_paths, 0, 0, 0 }, @@ -948,7 +948,7 @@ int parse_arguments(int *argc, const char ***argv, int frommain) return 0; } if (!files_from) - recurse = -1; /* infinite recursion */ + recurse = 1; #ifdef SUPPORT_LINKS preserve_links = 1; #endif @@ -1281,7 +1281,7 @@ void server_options(char **args,int *argc) argstr[x++] = 'O'; if (preserve_perms) argstr[x++] = 'p'; - if (recurse < 0) + if (recurse) argstr[x++] = 'r'; if (always_checksum) argstr[x++] = 'c'; @@ -1301,7 +1301,7 @@ void server_options(char **args,int *argc) /* This is a complete hack - blame Rusty. FIXME! * This hack is only needed for older rsync versions that * don't understand the --list-only option. */ - if (list_only == 1 && recurse >= 0) + if (list_only == 1 && recurse) argstr[x++] = 'r'; argstr[x] = 0; -- 2.34.1