Skip to content

Commit

Permalink
Don't falsely report failed write if it didn't fail
Browse files Browse the repository at this point in the history
  • Loading branch information
xPaw committed May 15, 2016
1 parent 3fc9426 commit 2e9500d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/userLog.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
);
};

0 comments on commit 2e9500d

Please sign in to comment.