Skip to content

Commit

Permalink
Fix unlink file bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Pom4H authored and tshemsedinov committed Dec 7, 2021
1 parent 80386d2 commit f772d70
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- Fix typings
- Remove useless code from tests
- Fix unlink file bug

## [3.1.5][] - 2021-10-11

Expand Down
2 changes: 1 addition & 1 deletion metalog.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ class Logger extends events.EventEmitter {
resolve();
fs.stat(fileName, (err, stats) => {
if (!err && stats.size === 0) {
fsp.unlink(this.file);
fsp.unlink(fileName).catch(() => {});
}
});
});
Expand Down

0 comments on commit f772d70

Please sign in to comment.