Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-11-12 22:59:23 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-11-12 23:02:51 +0300
commit20d06eb3a85bc2930aef9a9d882d66905fb1fecf (patch)
treec08957924c5dbd17adcb210d665d170da6aad831
parentd23a53c74af7601d45f90b182bcde035ef0d691c (diff)
WM: avoid string replace w/ appconfig-activate
Better construct an exact path, this would fail if the path exists multiple times in the string.
-rw-r--r--release/scripts/startup/bl_operators/wm.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index 381e98c2940..53735ed3ece 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -1417,10 +1417,10 @@ class WM_OT_appconfig_activate(Operator):
def execute(self, context):
import os
- bpy.utils.keyconfig_set(self.filepath)
-
- filepath = self.filepath.replace("keyconfig", "interaction")
-
+ filepath = self.filepath
+ bpy.utils.keyconfig_set(filepath)
+ dirname, filename = os.path.split(filepath)
+ filepath = os.path.normpath(os.path.join(dirname, os.pardir, "interaction", filename))
if os.path.exists(filepath):
bpy.ops.script.execute_preset(
filepath=filepath,