Make config saving synchronous

This commit is contained in:
calzoneman 2013-08-17 18:45:21 -05:00
parent b686deb16f
commit f4b32ad3ad

View file

@ -49,12 +49,7 @@ function save(cfg, file) {
if(k !== "nodemailer" && k !== "loaded") if(k !== "nodemailer" && k !== "loaded")
x[k] = cfg[k]; x[k] = cfg[k];
} }
fs.writeFile(file, JSON.stringify(x, null, 4), function (err) { fs.writeFileSync(file, JSON.stringify(x, null, 4));
if(err) {
Logger.errlog.log("Failed to save config");
Logger.errlog.log(err);
}
});
} }
exports.load = function (Server, file, callback) { exports.load = function (Server, file, callback) {