🐛 Honor fs.readFileSync contract for empty packed asar file
This commit is contained in:
parent
0e50b00fdf
commit
810af2f95d
1 changed files with 3 additions and 1 deletions
|
@ -263,7 +263,9 @@ exports.wrapFsWithAsar = (fs) ->
|
|||
|
||||
info = archive.getFileInfo filePath
|
||||
notFoundError asarPath, filePath unless info
|
||||
return new Buffer(0) if info.size is 0
|
||||
|
||||
if info.size is 0
|
||||
return if options then '' else new Buffer(0)
|
||||
|
||||
if info.unpacked
|
||||
realPath = archive.copyFileOut filePath
|
||||
|
|
Loading…
Reference in a new issue