]> khamidou — GitHub mirrors - electron.git/commitdiff
Make sure fs.readdir calls its callback asynchronously.
authorCheng Zhao <zcbenz@gmail.com>
Wed, 24 Sep 2014 11:10:37 +0000 (19:10 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Wed, 24 Sep 2014 11:10:37 +0000 (19:10 +0800)
atom/common/lib/asar.coffee

index baa376f05f67dfd0781076c784c3b6c8c178d685..11f555adcc3d866ed9e7faa3f54cca5581ee86b3 100644 (file)
@@ -191,7 +191,8 @@ fs.readdir = (p, callback) ->
   files = archive.readdir filePath
   return callback createNotFoundError(asarPath, filePath) unless files
 
-  callback undefined, files
+  process.nextTick ->
+    callback undefined, files
 
 readdirSync = fs.readdirSync
 fs.readdirSync = (p) ->