From 041f7257487008f526cef1634c54fbdf572408ee Mon Sep 17 00:00:00 2001 From: WuYafeng Date: Tue, 31 Dec 2024 22:25:05 +0800 Subject: [PATCH] Update config.ts --- src/webui/src/helper/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webui/src/helper/config.ts b/src/webui/src/helper/config.ts index 9663ddcf..0b3d061f 100644 --- a/src/webui/src/helper/config.ts +++ b/src/webui/src/helper/config.ts @@ -101,7 +101,7 @@ export class WebUiConfigWrapper { if (!parsedConfig.prefix.startsWith('/')) parsedConfig.prefix = '/' + parsedConfig.prefix; if (parsedConfig.prefix.endsWith('/')) parsedConfig.prefix = parsedConfig.prefix.slice(0, -1); // 配置已经被操作过了,还是回写一下吧,不然新配置不会出现在配置文件里 - if (!await fs.access(configPath, constants.W_OK).then(() => true).catch(() => false)) { + if (await fs.access(configPath, constants.W_OK).then(() => true).catch(() => false)) { await fs.writeFile(configPath, JSON.stringify(parsedConfig, null, 4)); } // 不希望回写的配置放后面