From 42cee0d01813d9e81430cc92933dc6c51e088336 Mon Sep 17 00:00:00 2001 From: WuYafeng Date: Tue, 31 Dec 2024 22:38:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E6=B2=A1=E6=9C=89=E5=86=99=E5=85=A5?= =?UTF-8?q?=E6=9D=83=E9=99=90=E6=97=B6=E8=AE=B0=E5=BD=95warn=E6=97=A5?= =?UTF-8?q?=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/webui/src/helper/config.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/webui/src/helper/config.ts b/src/webui/src/helper/config.ts index 0b3d061f..a53c1ea7 100644 --- a/src/webui/src/helper/config.ts +++ b/src/webui/src/helper/config.ts @@ -104,6 +104,9 @@ export class WebUiConfigWrapper { if (await fs.access(configPath, constants.W_OK).then(() => true).catch(() => false)) { await fs.writeFile(configPath, JSON.stringify(parsedConfig, null, 4)); } + else { + console.warn(`文件: ${configPath} 没有写入权限, 配置的更改部分可能会在重启后还原.`); + } // 不希望回写的配置放后面 // 查询主机地址是否可用