From 06453011c75a25bad3a4def5e09d9408ba7120a6 Mon Sep 17 00:00:00 2001 From: petar-iv Date: Thu, 9 Nov 2017 13:01:45 +0200 Subject: [PATCH] Use path.sep instead of forward slash --- diveSync.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/diveSync.js b/diveSync.js index 6c9ac03..8992ad9 100644 --- a/diveSync.js +++ b/diveSync.js @@ -1,4 +1,5 @@ var fs = require('fs'), + OS_PATH_SEP = require('path').sep, append = require('append'); // general function @@ -33,7 +34,7 @@ var diveSync = function(dir, opt, action) { list.sort().some(function (file) { if (opt.all || file[0] != '.') { // full path of that file - var path = dir + '/' + file; + var path = dir + OS_PATH_SEP + file; // get the file's stats var stat = fs.statSync(path);