Parcourir la source

{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'
jackalbe il y a 4 ans
Parent
commit
faf93a93f4

+ 1 - 1
Gems/EditorPythonBindings/Code/Source/PythonSystemComponent.cpp

@@ -543,7 +543,7 @@ namespace EditorPythonBindings
         {
         {
             if (!oldPathSet.contains(thisStr))
             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;
                 appended = true;
             }
             }
         }
         }