mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-25 20:53:15 +00:00
1. Fixed unpipe bug
2. Fixed Windows/Linux interop issue
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -731,7 +731,7 @@ void ILibDuktape_readableStream_unpipe_later(duk_context *ctx, void ** args, int
|
|||||||
duk_push_heapptr(ctx, imm); // [immediate]
|
duk_push_heapptr(ctx, imm); // [immediate]
|
||||||
duk_push_heapptr(ctx, args[0]); // [immediate][this]
|
duk_push_heapptr(ctx, args[0]); // [immediate][this]
|
||||||
duk_put_prop_string(ctx, -2, "\xFF_Self"); // [immediate]
|
duk_put_prop_string(ctx, -2, "\xFF_Self"); // [immediate]
|
||||||
if (args[1] != NULL) { duk_push_heapptr(ctx, args[1]); duk_put_prop_string(ctx, -2, "\xFF_w"); }
|
if (argsLen > 1 && args[1] != NULL) { duk_push_heapptr(ctx, args[1]); duk_put_prop_string(ctx, -2, "\xFF_w"); }
|
||||||
duk_pop(ctx); // ...
|
duk_pop(ctx); // ...
|
||||||
sem_post(&(data->pipeLock));
|
sem_post(&(data->pipeLock));
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -22,7 +22,14 @@ var duplex = require('stream').Duplex;
|
|||||||
|
|
||||||
function checkFolderPath(dest)
|
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 tokens = dest.split(process.platform == 'win32' ? '\\' : '/');
|
||||||
|
|
||||||
var base = tokens.shift();
|
var base = tokens.shift();
|
||||||
@@ -40,7 +47,14 @@ function extractNext(p)
|
|||||||
if (p.pending.length == 0) { p.source.close(); p._res(); return; }
|
if (p.pending.length == 0) { p.source.close(); p._res(); return; }
|
||||||
var next = p.pending.pop();
|
var next = p.pending.pop();
|
||||||
var dest = p.baseFolder + (process.platform == 'win32' ? '\\' : '/') + next;
|
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);
|
console.info1('Extracting: ' + dest);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user