API: Normalize paths to Python interpreter

This commit is contained in:
Jon Evans
2024-12-20 17:16:05 -05:00
parent 3ebe124ae7
commit d83e6326a5
2 changed files with 10 additions and 3 deletions
+9
View File
@@ -24,6 +24,7 @@
#include <paths.h>
#include <python_manager.h>
#include <wx_filename.h>
class PYTHON_PROCESS : public wxProcess
@@ -72,6 +73,14 @@ private:
};
PYTHON_MANAGER::PYTHON_MANAGER( const wxString& aInterpreterPath )
{
wxFileName path( aInterpreterPath );
path.Normalize( FN_NORMALIZE_FLAGS );
m_interpreterPath = path.GetFullPath();
}
void PYTHON_MANAGER::Execute( const wxString& aArgs,
const std::function<void( int, const wxString&,
const wxString& )>& aCallback,
+1 -3
View File
@@ -32,9 +32,7 @@
class KICOMMON_API PYTHON_MANAGER
{
public:
PYTHON_MANAGER( const wxString& aInterpreterPath ) :
m_interpreterPath( aInterpreterPath )
{}
PYTHON_MANAGER( const wxString& aInterpreterPath );
void Execute( const wxString& aArgs,
const std::function<void(int, const wxString&, const wxString&)>& aCallback,