Skip to content

Commit a50482c

Browse files
committed
fix(encoding): encoding for binary file
1 parent 4df7db6 commit a50482c

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/handlers/readTargetFile.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ module.exports = file => {
77
try {
88
fs.accessSync(file.targetPath, fs.constants.F_OK)
99
} catch(e) {
10-
console.log('exist', e)
1110
return { ...file, targetFile: { exist: false } }
1211
}
1312

src/recommendFileEncoding.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ const { extname } = require('path')
44
const binaryFileExtensitions = ['.jpg', '.png', '.ico']
55

66
module.exports = path => {
7-
if (binaryFileExtensitions.includes(extname(path))) return 'buffer'
7+
if (binaryFileExtensitions.includes(extname(path))) return 'binary'
88
return 'utf8'
99
}

0 commit comments

Comments
 (0)