From faf93a93f4769e8df972469da3d8948248431d94 Mon Sep 17 00:00:00 2001 From: jackalbe <23512001+jackalbe@users.noreply.github.com> Date: Fri, 7 May 2021 14:38:18 -0500 Subject: [PATCH] {LYN-3645} Fix up EPB search paths for Editor Scripts (#645) * {LYN-3645} Fix up EPB search paths for Editor Scripts * Changes the path to a raw string to properly escape Windows paths that use backslashes Jira: https://jira.agscollab.com/browse/LYN-3645 Tests: The PythonVMLoads_SysPathExtendedToGemScripts_EditorPythonBindingsValidaitonFound now works * the correct location of the 'r' --- Gems/EditorPythonBindings/Code/Source/PythonSystemComponent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gems/EditorPythonBindings/Code/Source/PythonSystemComponent.cpp b/Gems/EditorPythonBindings/Code/Source/PythonSystemComponent.cpp index 4e1a3dc06e..38660fce02 100644 --- a/Gems/EditorPythonBindings/Code/Source/PythonSystemComponent.cpp +++ b/Gems/EditorPythonBindings/Code/Source/PythonSystemComponent.cpp @@ -543,7 +543,7 @@ namespace EditorPythonBindings { if (!oldPathSet.contains(thisStr)) { - pathAppend.append(AZStd::string::format("sys.path.append('%s')\n", thisStr.c_str())); + pathAppend.append(AZStd::string::format("sys.path.append(r'%s')\n", thisStr.c_str())); appended = true; } }