From a3edde7641a026035cc42c33e335183444e7fd47 Mon Sep 17 00:00:00 2001 From: Phil Date: Thu, 11 Apr 2019 14:28:34 +0300 Subject: [PATCH] + glob searchPattern for Windows and Linux --- src/importer.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/importer.js b/src/importer.js index 48579df..753f89f 100644 --- a/src/importer.js +++ b/src/importer.js @@ -53,7 +53,16 @@ class Importer { getXMLDatastores(paths) { const arr = paths.map(p => { p = path.resolve(p); - const searchPattern = `${p}\\**\\*.xml`; + + var searchPattern; + + if (process.platform == 'linux') { + searchPattern = `${p}/**/*.xml`; + } + else if (process.platform == 'win32') { + searchPattern = `${p}\\**\\*.xml`; + } + return glob.sync(searchPattern); });