Bug#314473: rsync still fails badly with an "!" in .cvsignore
Wayne Davison
wayned at samba.org
Fri Sep 16 16:09:35 GMT 2005
On Fri, Sep 16, 2005 at 03:27:22PM +0200, Paul Slootman wrote:
> I've found that when "!" was scanned, the pointer was not advanced,
> hence there appeared to be trailing chars... The following patch seems
> to fix it.
No, the pointer must not be advanced or it will not properly handle
names that start with a '!'. Thus, your patch creates a new bug.
The problem is that the length-check was trying to only complain about
fitler rules, but it also accidentally complaind about cvsignore rules.
The fix is attached.
..wayne..
-------------- next part --------------
--- exclude.c 29 Jul 2005 18:31:07 -0000 1.119
+++ exclude.c 16 Sep 2005 16:07:14 -0000
@@ -827,7 +827,8 @@ static const char *parse_rule_tok(const
len = strlen((char*)s);
if (new_mflags & MATCHFLG_CLEAR_LIST) {
- if (!(xflags & XFLG_OLD_PREFIXES) && len) {
+ if (!(mflags & MATCHFLG_NO_PREFIXES)
+ && !(xflags & XFLG_OLD_PREFIXES) && len) {
rprintf(FERROR,
"'!' rule has trailing characters: %s\n", p);
exit_cleanup(RERR_SYNTAX);
More information about the rsync
mailing list