File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -235,9 +235,11 @@ def _apply_maahub_ui_config(config: dict) -> bool:
235235
236236
237237def ensure_mxu_ui_config () -> None :
238+ import stat
238239 config_dir = Path (project_root_dir ) / "config"
239240 config_dir .mkdir (exist_ok = True )
240241 config_path = config_dir / "mxu-MaaNTE.json"
242+ os .chmod (config_path , stat .S_IWRITE )
241243 config = {}
242244 if config_path .exists ():
243245 try :
@@ -252,6 +254,7 @@ def ensure_mxu_ui_config() -> None:
252254 config = {}
253255
254256 changed = _apply_maahub_ui_config (config )
257+
255258 if not changed :
256259 return
257260
@@ -261,6 +264,8 @@ def ensure_mxu_ui_config() -> None:
261264 f .write ("\n " )
262265 except Exception :
263266 logger .exception ("写入 mxu-MaaNTE.json 失败" )
267+
268+ os .chmod (config_path , stat .S_IREAD )
264269
265270
266271def read_interface_version (interface_file_name = "./interface.json" ) -> str :
You can’t perform that action at this time.
0 commit comments