Browse Source

preprocess_args: fix option name matching

previously, it also matched on --sort-by when it only should have matched on --sort.
Thomas Waldmann 3 weeks ago
parent
commit
f837e6a27a
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/borg/archiver.py

+ 2 - 1
src/borg/archiver.py

@@ -2805,7 +2805,8 @@ class Archiver:
         ]
         for i, arg in enumerate(args[:]):
             for old_name, new_name, warning in deprecations:
-                if arg.startswith(old_name):
+                # either --old_name or --old_name=...
+                if arg == old_name or arg.startswith(old_name) and arg[len(old_name)] == '=':
                     if new_name is not None:
                         args[i] = arg.replace(old_name, new_name)
                     print(warning, file=sys.stderr)