]> khamidou — GitHub mirrors - electron.git/commitdiff
Fill the stats object as much as we can.
authorCheng Zhao <zcbenz@gmail.com>
Wed, 24 Sep 2014 11:10:13 +0000 (19:10 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Wed, 24 Sep 2014 11:10:13 +0000 (19:10 +0800)
atom/common/lib/asar.coffee

index f3ec174a638f7a3e2e5ab3d7d838a6298da4d20b..baa376f05f67dfd0781076c784c3b6c8c178d685 100644 (file)
@@ -14,8 +14,18 @@ splitPath = (p) ->
   return [false, p]
 
 # Convert asar archive's Stats object to fs's Stats object.
+nextInode = 0
+uid = if process.getuid? then process.getuid() else 0
+gid = if process.getgid? then process.getgid() else 0
 asarStatsToFsStats = (stats) ->
   {
+    dev: 1,
+    ino: ++nextInode,
+    mode: 33188,
+    nlink: 1,
+    uid: uid,
+    gid: gid,
+    rdev: 0,
     size: stats.size
     isFile: -> stats.isFile
     isDirectory: -> stats.isDirectory