From 4d2e4ed5732254970c90d7e2224f21bec6959788 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 24 Sep 2014 19:10:13 +0800 Subject: [PATCH] Fill the stats object as much as we can. --- atom/common/lib/asar.coffee | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 -- 2.43.0