From ba4570dcd4ed243e97178e8e23b7d7a30d63b5e5 Mon Sep 17 00:00:00 2001 From: Jesse Wang Date: Thu, 13 Sep 2018 09:56:06 +1200 Subject: [PATCH] Fix logs ratain on Windows platform fixes #56 --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index ad9938a..36775b1 100644 --- a/app.js +++ b/app.js @@ -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) {