diff --git a/_server/editor_config.js b/_server/editor_config.js index bf0dd074..497c246e 100644 --- a/_server/editor_config.js +++ b/_server/editor_config.js @@ -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(); }) }