Make config saving synchronous
This commit is contained in:
parent
b686deb16f
commit
f4b32ad3ad
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue