asar: Fix fs.realpath on package's root
This commit is contained in:
parent
b87dfb964c
commit
915c1b19d3
1 changed files with 2 additions and 2 deletions
|
@ -118,7 +118,7 @@ fs.realpathSync = (p) ->
|
||||||
throw new Error("Invalid package #{asarPath}") unless archive
|
throw new Error("Invalid package #{asarPath}") unless archive
|
||||||
|
|
||||||
real = archive.realpath filePath
|
real = archive.realpath filePath
|
||||||
throw createNotFoundError(asarPath, filePath) unless real
|
throw createNotFoundError(asarPath, filePath) if real is false
|
||||||
|
|
||||||
path.join realpathSync(asarPath), real
|
path.join realpathSync(asarPath), real
|
||||||
|
|
||||||
|
@ -135,7 +135,7 @@ fs.realpath = (p, cache, callback) ->
|
||||||
return callback new Error("Invalid package #{asarPath}") unless archive
|
return callback new Error("Invalid package #{asarPath}") unless archive
|
||||||
|
|
||||||
real = archive.realpath filePath
|
real = archive.realpath filePath
|
||||||
return callback createNotFoundError(asarPath, filePath) unless real
|
return callback createNotFoundError(asarPath, filePath) if real is false
|
||||||
|
|
||||||
realpath asarPath, (err, p) ->
|
realpath asarPath, (err, p) ->
|
||||||
return callback err if err
|
return callback err if err
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue