fix: 添加基建配置文件路径实际逻辑
This commit is contained in:
@@ -1186,6 +1186,8 @@ class AppConfig(GlobalConfig):
|
||||
|
||||
logger.info(f"{script_id} - {user_id} 设置基建配置: {jsonFile}")
|
||||
|
||||
script_config = self.ScriptConfig[uuid.UUID(script_id)]
|
||||
uid = uuid.UUID(user_id)
|
||||
json_path = Path(jsonFile)
|
||||
|
||||
if not json_path.exists():
|
||||
@@ -1200,6 +1202,9 @@ class AppConfig(GlobalConfig):
|
||||
/ f"data/{script_id}/{user_id}/Infrastructure/infrastructure.json",
|
||||
)
|
||||
|
||||
if isinstance(script_config, (MaaConfig)):
|
||||
await script_config.UserData[uid].set("Info", "InfrastPath", str(json_path))
|
||||
|
||||
async def add_plan(
|
||||
self, script: Literal["MaaPlan"]
|
||||
) -> tuple[uuid.UUID, ConfigBase]:
|
||||
|
||||
Reference in New Issue
Block a user