mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Merge pull request #3132 from princejwesley/issue-readFileSync
Fix: honor fs.readFileSync contract for empty packed asar file
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user