X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/e425fbe85d718e43e284b0c45c55db76f627e4e0..e7bf7c01613fbd726720cb676bc47a743da06f2f:/exclude.c diff --git a/exclude.c b/exclude.c index 5c8c7f47..225c0e21 100644 --- a/exclude.c +++ b/exclude.c @@ -383,11 +383,9 @@ void send_exclude_list(int f) { struct exclude_struct *ent; - /* This is a complete hack - blame Rusty. - * - * FIXME: This pattern shows up in the output of - * report_exclude_result(), which is not ideal. */ - if (list_only && !recurse) + /* This is a complete hack - blame Rusty. FIXME! + * Remove this hack when older rsyncs (below 2.6.4) are gone. */ + if (list_only == 1 && !recurse) add_exclude(&exclude_list, "/*/*", 0); for (ent = exclude_list.head; ent; ent = ent->next) { @@ -405,7 +403,7 @@ void send_exclude_list(int f) if (ent->match_flags & MATCHFLG_INCLUDE) { write_int(f, l + 2); write_buf(f, "+ ", 2); - } else if ((*p == '-' || *p == '+') && p[1] == ' ') { + } else if (*p == '-' || *p == '+') { write_int(f, l + 2); write_buf(f, "- ", 2); } else