From 8c3e66a62dd2253bea2640775ef2336ecb29ae2d Mon Sep 17 00:00:00 2001 From: Zhuo Lu Date: Fri, 20 Apr 2018 21:19:19 -0700 Subject: [PATCH] feat: Include all binary-like files --- util.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/util.js b/util.js index e048e15..c92ea56 100644 --- a/util.js +++ b/util.js @@ -221,23 +221,12 @@ module.exports.walkAsync = function (dirPath) { .then(function (stat) { if (stat.isFile()) { switch (path.extname(filePath)) { - case '': // Binary - if (path.basename(filePath)[0] !== '.') { - return getFilePathIfBinaryAsync(filePath) - } // Else reject hidden file - break - case '.dylib': // Dynamic library - case '.node': // Native node addon - return filePath case '.cstemp': // Temporary file generated from past codesign debuglog('Removing... ' + filePath) return unlinkAsync(filePath) .thenReturn(undefined) default: - if (path.extname(filePath).indexOf(' ') >= 0) { - // Still consider the file as binary if extension seems invalid - return getFilePathIfBinaryAsync(filePath) - } + return getFilePathIfBinaryAsync(filePath) } } else if (stat.isDirectory() && !stat.isSymbolicLink()) { return _walkAsync(filePath)