Skip to content

Commit

Permalink
Include all binary like files
Browse files Browse the repository at this point in the history
  • Loading branch information
sethlu committed Apr 21, 2018
1 parent 70faa04 commit 170e8c0
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions util.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 170e8c0

Please sign in to comment.