]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
Fix --relative when copying an absolute path.
authorWayne Davison <wayne@opencoder.net>
Tue, 9 Aug 2022 04:30:21 +0000 (21:30 -0700)
committerWayne Davison <wayne@opencoder.net>
Tue, 9 Aug 2022 04:30:43 +0000 (21:30 -0700)
exclude.c

index 2394023fbd544c3dc8be777f94c3e1d8676be56f..ba5ca5a3dacd8d3ff105c2aeffe188e53bef9aee 100644 (file)
--- a/exclude.c
+++ b/exclude.c
@@ -434,8 +434,10 @@ void add_implied_include(const char *arg)
                                *p++ = *cp++;
                                break;
                          case '/':
-                               if (p[-1] == '/') /* This is safe because of the initial slash. */
+                               if (p[-1] == '/') { /* This is safe because of the initial slash. */
+                                       cp++;
                                        break;
+                               }
                                if (relative_paths) {
                                        filter_rule const *ent;
                                        int found = 0;