From 808b1d61c0085d4d8fba6a949da5bbd11480c59c Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Wed, 30 Dec 2009 12:25:33 -0800 Subject: [PATCH] Fixed the passing of a '/' modifier for an absolute-path filter rule. --- NEWS | 3 +++ exclude.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/NEWS b/NEWS index b0040bb2..60e852c3 100644 --- a/NEWS +++ b/NEWS @@ -26,6 +26,9 @@ Changes since 3.0.6: - Get the permissions right on a --fake-super transferred directory that needs more owner permissions to emulate root behavior. + - An absolute-path filter rule (i.e. with a '/' modifier) no longer loses + its modifier when sending the filter rules to the remote rsync. + - Improved the "--delete does not work without -r or -d" message. - Improved rsync's handling of --timeout to avoid a weird timeout case diff --git a/exclude.c b/exclude.c index 3538a74b..70fa8c8a 100644 --- a/exclude.c +++ b/exclude.c @@ -1121,6 +1121,8 @@ char *get_rule_prefix(int match_flags, const char *pat, int for_xfer, else legal_len = 0; + if (match_flags & MATCHFLG_ABS_PATH) + *op++ = '/'; if (match_flags & MATCHFLG_NEGATE) *op++ = '!'; if (match_flags & MATCHFLG_CVS_IGNORE) -- 2.47.3