From: Cheng Zhao Date: Tue, 30 Sep 2014 07:09:50 +0000 (+0800) Subject: asar: Fix fs.realpath on package's root X-Git-Tag: v0.17.0~6^2~3 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=915c1b19d3badabdea00b1d7ba76cf1550b3b442;p=electron.git asar: Fix fs.realpath on package's root --- diff --git a/atom/common/lib/asar.coffee b/atom/common/lib/asar.coffee index 114e1942..8d92563f 100644 --- a/atom/common/lib/asar.coffee +++ b/atom/common/lib/asar.coffee @@ -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