Skip to content

Commit

Permalink
Update config.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-yafeng authored Dec 31, 2024
1 parent 0594d61 commit 041f725
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/webui/src/helper/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
// 不希望回写的配置放后面
Expand Down

0 comments on commit 041f725

Please sign in to comment.