Skip to content

Commit a533105

Browse files
committed
fix: fix python engine
1 parent e80acaf commit a533105

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/lse/PluginManager.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ PluginManager::PluginManager() : ll::plugin::PluginManager(PluginManagerName) {}
6363
auto PluginManager::load(ll::plugin::Manifest manifest) -> bool {
6464
auto& logger = getSelfPluginInstance().getLogger();
6565
#ifdef LEGACY_SCRIPT_ENGINE_BACKEND_PYTHON
66-
std::filesystem::path dirPath = ll::plugin::getPluginsRoot() / manifest.name; // Plugin path
67-
// std::string entryPath = PythonHelper::findEntryScript(dirPath.string()); // Plugin entry
66+
std::filesystem::path dirPath = ll::plugin::getPluginsRoot() / manifest.name; // Plugin path
67+
std::string entryPath = PythonHelper::findEntryScript(dirPath.string()); // Plugin entry
6868
// if (entryPath.empty()) return false;
6969
// std::string pluginName = PythonHelper::getPluginPackageName(dirPath.string()); // Plugin name
7070

@@ -147,9 +147,8 @@ auto PluginManager::load(ll::plugin::Manifest manifest) -> bool {
147147
scriptEngine.eval("_llse_py_sys_module.path.insert(0, r'" + pluginSitePackageFormatted + "')");
148148
}
149149
// add plugin source dir to sys.path
150-
string sourceDirFormatted = ll::string_utils::u8str2str(
151-
std::filesystem::canonical(std::filesystem::path(dirPath).make_preferred()).u8string()
152-
);
150+
string sourceDirFormatted =
151+
ll::string_utils::u8str2str(std::filesystem::canonical(dirPath.make_preferred()).u8string());
153152
scriptEngine.eval("_llse_py_sys_module.path.insert(0, r'" + sourceDirFormatted + "')");
154153

155154
// set __file__ and __name__

0 commit comments

Comments
 (0)