]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
Fix rrsync directory normalization (#268)
authorMarco Nenciarini <mnencia@kcore.it>
Thu, 30 Dec 2021 16:59:17 +0000 (17:59 +0100)
committerGitHub <noreply@github.com>
Thu, 30 Dec 2021 16:59:17 +0000 (08:59 -0800)
Fix an off-by-one in the `args.dir_slash_len` variable that leads to base every absolute path on `/`

support/rrsync

index 469288b9f5550e8d5e939a4365ff9552b23f9361..fe1bc2507b523cc40da8ab097095af3813981ea4 100755 (executable)
@@ -368,7 +368,7 @@ if __name__ == '__main__':
     args = arg_parser.parse_args()
     args.dir = os.path.realpath(args.dir)
     args.dir_slash = args.dir + '/'
-    args.dir_slash_len = len(args.dir)
+    args.dir_slash_len = len(args.dir_slash)
     if args.ro:
         args.no_del = True
     elif not args.no_lock: