From 1eb7a7061af2f91149233937f3db066d303c7684 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Thu, 14 Jun 2018 15:19:34 -0700 Subject: [PATCH] Need to mark xattr rules in get_rule_prefix(). This fixes the bug of xattr filters getting sent as a normal filter rule (since the 'x' was dropped in the prefix). --- NEWS | 2 ++ exclude.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/NEWS b/NEWS index 792df231..1bcdba72 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,8 @@ Changes since 3.1.3: BUG FIXES: + - Fix xattr filter rules losing an 'x' attribute in a non-local transfer. + - Fix a compiler error/warning about shifting a negative value (in the zlib code). diff --git a/exclude.c b/exclude.c index 7989fb3e..a0090b29 100644 --- a/exclude.c +++ b/exclude.c @@ -1286,6 +1286,8 @@ char *get_rule_prefix(filter_rule *rule, const char *pat, int for_xfer, } if (rule->rflags & FILTRULE_EXCLUDE_SELF) *op++ = 'e'; + if (rule->rflags & FILTRULE_XATTR) + *op++ = 'x'; if (rule->rflags & FILTRULE_SENDER_SIDE && (!for_xfer || protocol_version >= 29)) *op++ = 's'; -- 2.47.2