mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-22 22:36:06 +08:00
修复对比工具保存文件
This commit is contained in:
parent
f25fe27473
commit
29f0c2c9ac
|
@ -89,7 +89,10 @@ export default (app: Router) => {
|
|||
if (config.blackFileList.includes(name)) {
|
||||
res.send({ code: 403, message: '文件无法访问' });
|
||||
}
|
||||
const path = join(config.configPath, name);
|
||||
let path = join(config.configPath, name);
|
||||
if (name.startsWith('data/scripts/')) {
|
||||
path = join(config.rootPath, name);
|
||||
}
|
||||
await fs.writeFile(path, content);
|
||||
res.send({ code: 200, message: '保存成功' });
|
||||
} catch (e) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user