Skip to content

Commit

Permalink
Fix logs ratain on Windows platform
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesse Wang committed Sep 12, 2018
1 parent 7bccdeb commit ba4570d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function get_limit_size() {

function delete_old(file) {
if (file === "/dev/null") return;
var fileBaseName = file.substr(0, file.length - 4).split('/').pop() + "__";
var fileBaseName = file.substr(0, file.length - 4).split(path.sep).pop() + "__";
var dirName = path.dirname(file);

fs.readdir(dirName, function(err, files) {
Expand Down

0 comments on commit ba4570d

Please sign in to comment.