🐛 Honor fs.readFileSync contract for empty packed asar file

This commit is contained in:
Prince J Wesley 2015-10-19 08:33:22 +05:30
parent 0e50b00fdf
commit 810af2f95d

View file

@ -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