1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2026-01-01 08:03:32 +00:00

1. Fixed unpipe bug

2. Fixed Windows/Linux interop issue
This commit is contained in:
Bryan Roe
2020-06-24 16:02:46 -07:00
parent 9b6669f074
commit 788adeb246
3 changed files with 18 additions and 4 deletions

View File

@@ -22,7 +22,14 @@ var duplex = require('stream').Duplex;
function checkFolderPath(dest)
{
if (process.platform == 'win32') { dest = dest.split('/').join('\\'); }
if (process.platform == 'win32')
{
dest = dest.split('/').join('\\');
}
else
{
dest = dest.split('\\').join('/');
}
var tokens = dest.split(process.platform == 'win32' ? '\\' : '/');
var base = tokens.shift();
@@ -40,7 +47,14 @@ function extractNext(p)
if (p.pending.length == 0) { p.source.close(); p._res(); return; }
var next = p.pending.pop();
var dest = p.baseFolder + (process.platform == 'win32' ? '\\' : '/') + next;
if (process.platform == 'win32') { dest = dest.split('/').join('\\'); }
if (process.platform == 'win32')
{
dest = dest.split('/').join('\\');
}
else
{
dest = dest.split('\\').join('/');
}
console.info1('Extracting: ' + dest);
try
{