From 6b5db8f5ae57ae944b894943a27f10b62be2a235 Mon Sep 17 00:00:00 2001 From: hagit Date: Tue, 21 Apr 2020 21:45:04 +0300 Subject: [PATCH] support windows file path (backslashes) --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 9277400..c0849d6 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).replace(/\\/g,'/').split('/').pop() + "__"; var dirName = path.dirname(file); fs.readdir(dirName, function(err, files) {