Fix rrsync directory normalization (#268)

Fix an off-by-one in the `args.dir_slash_len` variable that leads to base every absolute path on `/`
This commit is contained in:
Marco Nenciarini
2021-12-30 17:59:17 +01:00
committed by GitHub
parent e07f8fb863
commit ffec7fe109

View File

@@ -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: