From: Cheng Zhao Date: Wed, 24 Sep 2014 11:10:13 +0000 (+0800) Subject: Fill the stats object as much as we can. X-Git-Tag: v0.17.0~6^2~39 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=4d2e4ed5732254970c90d7e2224f21bec6959788;p=electron.git Fill the stats object as much as we can. --- diff --git a/atom/common/lib/asar.coffee b/atom/common/lib/asar.coffee index f3ec174a..baa376f0 100644 --- a/atom/common/lib/asar.coffee +++ b/atom/common/lib/asar.coffee @@ -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