Skip to content

Commit

Permalink
let keyword makes it scoped already (winstonjs#1436)
Browse files Browse the repository at this point in the history
* let keyword makes it scoped already

* miss

* another miss (squash)
  • Loading branch information
jimmywarting authored and DABH committed Aug 20, 2018
1 parent de245e6 commit 9719ed4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/winston/transports/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -594,8 +594,8 @@ module.exports = class File extends TransportStream {

// const isZipped = this.zippedArchive ? '.gz' : '';
const isZipped = this.zippedArchive ? '.gz' : '';
for (let x = this.maxFiles - 1; x > 0; x--) {
tasks.push(function (i) {
for (let i = this.maxFiles - 1; i > 0; i--) {
tasks.push(() => {
return cb => {
let fileName = `${basename}${(i - 1)}${ext}${isZipped}`;
const tmppath = path.join(this.dirname, fileName);
Expand All @@ -609,7 +609,7 @@ module.exports = class File extends TransportStream {
fs.rename(tmppath, path.join(this.dirname, fileName), cb);
});
};
}.bind(this, x));
});
}

asyncSeries(tasks, () => {
Expand Down

0 comments on commit 9719ed4

Please sign in to comment.