mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
asar: Fix fs.realpath on package's root
This commit is contained in:
@@ -118,7 +118,7 @@ fs.realpathSync = (p) ->
|
||||
throw new Error("Invalid package #{asarPath}") unless archive
|
||||
|
||||
real = archive.realpath filePath
|
||||
throw createNotFoundError(asarPath, filePath) unless real
|
||||
throw createNotFoundError(asarPath, filePath) if real is false
|
||||
|
||||
path.join realpathSync(asarPath), real
|
||||
|
||||
@@ -135,7 +135,7 @@ fs.realpath = (p, cache, callback) ->
|
||||
return callback new Error("Invalid package #{asarPath}") unless archive
|
||||
|
||||
real = archive.realpath filePath
|
||||
return callback createNotFoundError(asarPath, filePath) unless real
|
||||
return callback createNotFoundError(asarPath, filePath) if real is false
|
||||
|
||||
realpath asarPath, (err, p) ->
|
||||
return callback err if err
|
||||
|
||||
Reference in New Issue
Block a user