2
0
mirror of https://github.com/ctrlcvs/xiaoyao-cvs-plugin.git synced 2024-12-22 19:10:53 +08:00

fs.exists方法已不可用,修改为fs.existsSync

This commit is contained in:
sameu 2023-10-08 00:24:08 +08:00 committed by GitHub
parent ee9935087e
commit e30a0302d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -177,7 +177,7 @@ class GsCfg {
if (lodash.isEmpty(data)) {
fs.existsSync(file) && fs.unlinkSync(file)
} else {
fs.exists(file, (exists) => {
const exists = fs.existsSync(file)
if (!exists) {
fs.writeFileSync(file, "", 'utf8')
}
@ -195,7 +195,6 @@ class GsCfg {
fs.writeFileSync(file,YAML.stringify(ck), 'utf8')
}
}
})
}
}
}