Fixes #11970: Return values of FreeCAD.get*Dir and FreeCAD.get*Path functions have inconsistent path separators

This commit is contained in:
wmayer
2024-03-20 21:19:58 +01:00
committed by wwmayer
parent 4f429e3288
commit 2295cba5ef
2 changed files with 5 additions and 10 deletions

View File

@@ -697,7 +697,8 @@ PyObject* Application::sGetUserMacroPath(PyObject * /*self*/, PyObject *args)
if (Base::asBoolean(actual)) {
macroDir = App::GetApplication().
GetParameterGroupByPath("User parameter:BaseApp/Preferences/Macro")
->GetASCII("MacroPath",macroDir.c_str());
->GetASCII("MacroPath", macroDir.c_str());
std::replace(macroDir.begin(), macroDir.end(), '/', PATHSEP);
}
Py::String user_macro_dir(macroDir,"utf-8");