修复插件中使用相对导入时会爆炸

pull/1152/head
UnCLAS-Prommer 2025-07-28 09:46:40 +08:00
parent 6899adee05
commit 39891eef6d
No known key found for this signature in database
1 changed files with 1 additions and 0 deletions

View File

@ -289,6 +289,7 @@ class PluginManager:
return False
module = module_from_spec(spec)
module.__package__ = module_name # 设置模块包名
spec.loader.exec_module(module)
logger.debug(f"插件模块加载成功: {plugin_file}")