Fix v2.7 工程

This commit is contained in:
ckcz123 2020-06-03 21:05:38 +08:00
parent bb1e8060bd
commit c60ae14ae2

View File

@ -6,7 +6,7 @@ editor_config.prototype.load = function(callback) {
var _this = this;
fs.readFile(this.address, "utf-8", function(e, d) {
if (e) {
console.warn("无法读取配置文件, 已重新生成");
console.error("无法读取配置文件, 已重新生成");
_this.config = {};
_this.save(callback);
} else {
@ -28,7 +28,7 @@ editor_config.prototype.set = function(key, value, callback) {
editor_config.prototype.save = function(callback) {
fs.writeFile(this.address, JSON.stringify(this.config) ,'utf-8', function(e) {
if (e) printe("写入配置文件失败");
if (e) console.error("写入配置文件失败");
if (callback instanceof Function) callback();
})
}