Fill the stats object as much as we can.
This commit is contained in:
parent
0cab034dab
commit
4d2e4ed573
1 changed files with 10 additions and 0 deletions
|
@ -14,8 +14,18 @@ splitPath = (p) ->
|
||||||
return [false, p]
|
return [false, p]
|
||||||
|
|
||||||
# Convert asar archive's Stats object to fs's Stats object.
|
# 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) ->
|
asarStatsToFsStats = (stats) ->
|
||||||
{
|
{
|
||||||
|
dev: 1,
|
||||||
|
ino: ++nextInode,
|
||||||
|
mode: 33188,
|
||||||
|
nlink: 1,
|
||||||
|
uid: uid,
|
||||||
|
gid: gid,
|
||||||
|
rdev: 0,
|
||||||
size: stats.size
|
size: stats.size
|
||||||
isFile: -> stats.isFile
|
isFile: -> stats.isFile
|
||||||
isDirectory: -> stats.isDirectory
|
isDirectory: -> stats.isDirectory
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue