Skip to content

Commit

Permalink
Fix to be compatible with old old node.
Browse files Browse the repository at this point in the history
  • Loading branch information
trankin committed Feb 11, 2020
1 parent 309dc81 commit c4885f7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/install-ozw.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ function build(gypArgs, cb) {

function copyFiles() {
fsextra.copySync(tempPath + '/ozw/open-zwave-master/config', installPath + '/config');
fsextra.copySync(tempPath + '/ozw/open-zwave-master/cpp/src', installPath + '/include', { filter: (src, dest) => {
fsextra.copySync(tempPath + '/ozw/open-zwave-master/cpp/src', installPath + '/include', { filter: function (src, dest) {
var stat = fs.statSync(src);
return (stat && stat.isDirectory()) || !src.match(/^.*\.(?!h)[^.]+$/);
} });
}});
fsextra.copySync(tempPath + '/ozw/open-zwave-master/build/Release', installPath + '/bin');
}

Expand Down Expand Up @@ -220,7 +220,7 @@ module.exports = function(opts) {
fs.createReadStream( tempPath + "/ozw.zip")
.pipe(unzip.Extract({ path: tempPath + '/ozw' }))
.on('close', function() {
var sources = readdirSyncRecursive(tempPath + '/ozw/open-zwave-master/cpp').map((f) => f.replace(tempPath + '/ozw/open-zwave-master/cpp/', ''));
var sources = readdirSyncRecursive(tempPath + '/ozw/open-zwave-master/cpp').map(function (f) { return f.replace(tempPath + '/ozw/open-zwave-master/cpp/', ''); });


sources = sources.filter(function(f) {
Expand Down

0 comments on commit c4885f7

Please sign in to comment.