mirror of
https://github.com/electron/node-gyp.git
synced 2025-09-16 22:13:39 +02:00
parent
75099414c8
commit
382c86438f
16 changed files with 51 additions and 2737 deletions
9
node_modules/tar/lib/pack.js
generated
vendored
9
node_modules/tar/lib/pack.js
generated
vendored
|
@ -134,19 +134,22 @@ Pack.prototype._process = function () {
|
|||
var root = path.dirname((entry.root || entry).path)
|
||||
var wprops = {}
|
||||
|
||||
Object.keys(entry.props).forEach(function (k) {
|
||||
Object.keys(entry.props || {}).forEach(function (k) {
|
||||
wprops[k] = entry.props[k]
|
||||
})
|
||||
|
||||
if (me._noProprietary) wprops.noProprietary = true
|
||||
|
||||
wprops.path = path.relative(root, entry.path)
|
||||
wprops.path = path.relative(root, entry.path || '')
|
||||
|
||||
// actually not a matter of opinion or taste.
|
||||
if (process.platform === "win32") {
|
||||
wprops.path = wprops.path.replace(/\\/g, "/")
|
||||
}
|
||||
|
||||
if (!wprops.type)
|
||||
wprops.type = 'Directory'
|
||||
|
||||
switch (wprops.type) {
|
||||
// sockets not supported
|
||||
case "Socket":
|
||||
|
@ -156,11 +159,13 @@ Pack.prototype._process = function () {
|
|||
wprops.path += "/"
|
||||
wprops.size = 0
|
||||
break
|
||||
|
||||
case "Link":
|
||||
var lp = path.resolve(path.dirname(entry.path), entry.linkpath)
|
||||
wprops.linkpath = path.relative(root, lp) || "."
|
||||
wprops.size = 0
|
||||
break
|
||||
|
||||
case "SymbolicLink":
|
||||
var lp = path.resolve(path.dirname(entry.path), entry.linkpath)
|
||||
wprops.linkpath = path.relative(path.dirname(entry.path), lp) || "."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue