]> khamidou — GitHub mirrors - electron.git/commitdiff
asar: Fix fs.realpath on package's root
authorCheng Zhao <zcbenz@gmail.com>
Tue, 30 Sep 2014 07:09:50 +0000 (15:09 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Tue, 30 Sep 2014 07:09:50 +0000 (15:09 +0800)
atom/common/lib/asar.coffee

index 114e1942f133213e1fe4c690d15b17d2424d83cb..8d92563fc67b3d6d634a5b069832827bb915ab78 100644 (file)
@@ -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