Make config saving synchronous

This commit is contained in:
calzoneman 2013-08-17 18:45:21 -05:00
parent b686deb16f
commit f4b32ad3ad
1 changed files with 1 additions and 6 deletions

View File

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