mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-06 00:13:33 +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, args[0]); // [immediate][this]
|
||||
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); // ...
|
||||
sem_post(&(data->pipeLock));
|
||||
return;
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user