Skip to content

Commit

Permalink
[fix]: Update self.filename on ENOENT (#1109)
Browse files Browse the repository at this point in the history
  • Loading branch information
vsetka authored and indexzero committed Mar 9, 2018
1 parent 300ba32 commit d795dc9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/winston/transports/file.js
Expand Up @@ -343,6 +343,8 @@ File.prototype.stat = function stat(callback) {
fs.stat(fullpath, function (err, stat) {
if (err && err.code === 'ENOENT') {
debug('err ENOENT', fullpath);
// Update internally tracked filename with the new target name
self.filename = target;
return callback(null, 0);
}

Expand Down

0 comments on commit d795dc9

Please sign in to comment.