Don't falsely report failed write if it didn't fail

This commit is contained in:
Pavel Djundik 2016-05-15 11:15:20 +03:00
parent 7005034e82
commit e6990e0fc7
1 changed files with 3 additions and 1 deletions

View File

@ -39,7 +39,9 @@ module.exports.write = function(user, network, chan, msg) {
path + "/" + chan.replace(/%/g, "%%").replace(/\//g, "%") + ".log",
line + "\n",
function(e) {
log.error("Failed to write user log", e);
if (e) {
log.error("Failed to write user log", e);
}
}
);
};