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:
-rw-r--r--source/blender/python/intern/bpy_traceback.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/python/intern/bpy_traceback.c b/source/blender/python/intern/bpy_traceback.c
index 0e3162e09a4..f7aa6e0880b 100644
--- a/source/blender/python/intern/bpy_traceback.c
+++ b/source/blender/python/intern/bpy_traceback.c
@@ -155,12 +155,13 @@ void python_script_error_jump(const char *filepath, int *lineno, int *offset)
{
PyObject *coerce;
const char *tb_filepath = traceback_filepath(tb, &coerce);
- const int match = BLI_path_cmp(tb_filepath, filepath) != 0;
+ const int match = ((BLI_path_cmp(tb_filepath, filepath) == 0) ||
+ ((tb_filepath[0] == '\\' || tb_filepath[0] == '/') && BLI_path_cmp(tb_filepath + 1, filepath) == 0));
Py_DECREF(coerce);
if (match) {
*lineno = tb->tb_lineno;
- break;
+ /* used to break here, but better find the inner most line */
}
}
}