mirror of
https://github.com/ctrlcvs/xiaoyao-cvs-plugin.git
synced 2024-12-23 03:20:52 +08:00
fs.exists方法已不可用,修改为fs.existsSync
This commit is contained in:
parent
ee9935087e
commit
e30a0302d7
@ -177,7 +177,7 @@ class GsCfg {
|
|||||||
if (lodash.isEmpty(data)) {
|
if (lodash.isEmpty(data)) {
|
||||||
fs.existsSync(file) && fs.unlinkSync(file)
|
fs.existsSync(file) && fs.unlinkSync(file)
|
||||||
} else {
|
} else {
|
||||||
fs.exists(file, (exists) => {
|
const exists = fs.existsSync(file)
|
||||||
if (!exists) {
|
if (!exists) {
|
||||||
fs.writeFileSync(file, "", 'utf8')
|
fs.writeFileSync(file, "", 'utf8')
|
||||||
}
|
}
|
||||||
@ -195,7 +195,6 @@ class GsCfg {
|
|||||||
fs.writeFileSync(file,YAML.stringify(ck), 'utf8')
|
fs.writeFileSync(file,YAML.stringify(ck), 'utf8')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user