Merge pull request #2034 from hongrich/internalModuleReadFile-asar-unpack
Update internalModuleReadFile to support unpacked asar files
This commit is contained in:
commit
4f6e70a75c
2 changed files with 23 additions and 0 deletions
|
@ -323,6 +323,10 @@ exports.wrapFsWithAsar = (fs) ->
|
|||
return undefined unless info
|
||||
return '' if info.size is 0
|
||||
|
||||
if info.unpacked
|
||||
realPath = archive.copyFileOut filePath
|
||||
return fs.readFileSync realPath, encoding: 'utf8'
|
||||
|
||||
buffer = new Buffer(info.size)
|
||||
fd = archive.getFd()
|
||||
retrun undefined unless fd >= 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue