Fix T71284: batch rename escape's dashes
authorCampbell Barton <ideasman42@gmail.com>
Sun, 3 Nov 2019 00:27:03 +0000 (11:27 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 3 Nov 2019 00:28:49 +0000 (11:28 +1100)
release/scripts/startup/bl_operators/wm.py

index e7989bec2276c9bba2fdfd5f70a763a164ffb5ec..6b3b9adb52ba6c12049feb9b4e1b4e3abdc0805b 100644 (file)
@@ -2041,7 +2041,7 @@ class WM_OT_batch_rename(Operator):
                         replace_dst = action.replace_dst.replace("\\", "\\\\")
                 else:
                     replace_src = re.escape(action.replace_src)
-                    replace_dst = re.escape(action.replace_dst)
+                    replace_dst = action.replace_dst.replace("\\", "\\\\")
                 name = re.sub(
                     replace_src,
                     replace_dst,