]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
Fix really silly bug with --relative rules.
authorWayne Davison <wayne@opencoder.net>
Wed, 14 Sep 2022 03:56:32 +0000 (20:56 -0700)
committerWayne Davison <wayne@opencoder.net>
Wed, 14 Sep 2022 03:56:32 +0000 (20:56 -0700)
exclude.c

index 4bf85cb37002369cc3103260ce7528ced57fe337..b21207bab2d0bc4c927edd3c5210a77f6cd058c1 100644 (file)
--- a/exclude.c
+++ b/exclude.c
@@ -494,9 +494,9 @@ void add_implied_include(const char *arg, int skip_daemon_module)
                                maybe_add_literal_brackets_rule(rule, arg_len);
                        if (relative_paths && slash_cnt) {
                                filter_rule const *ent;
-                               int found = 0;
                                slash_cnt = 1;
                                for (p = new_pat + 1; (p = strchr(p, '/')) != NULL; p++) {
+                                       int found = 0;
                                        *p = '\0';
                                        for (ent = implied_filter_list.head; ent; ent = ent->next) {
                                                if (ent != rule && strcmp(ent->pattern, new_pat) == 0) {