+ glob searchPattern for Windows and Linux
This commit is contained in:
parent
42b48adb36
commit
a3edde7641
|
|
@ -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);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user