1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-09-16 10:21:37 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

fix harmony more than 2M issue (#470)

This commit is contained in:
波仔糕
2025-02-10 14:58:54 +08:00
committed by GitHub
parent 23ccfccdce
commit 828212f5bf
2 changed files with 7 additions and 3 deletions

View File

@@ -72,16 +72,18 @@ napi_value HdiffPatch(napi_env env, napi_callback_info info) {
// 创建结果buffer
napi_value resultBuffer;
uint8_t* outPtr;
status = napi_create_buffer(env, newsize, (void**)&outPtr, &resultBuffer);
void* data;
status = napi_create_arraybuffer(env, newsize, &data, &resultBuffer);
if (status != napi_ok) {
napi_throw_error(env, NULL, "Failed to create result buffer");
return NULL;
}
outPtr = (uint8_t*)data;
// 执行patch
_check(kHPatch_ok==hpatch_by_mem(originPtr, originLength, outPtr, newsize,
patchPtr, patchLength, &patInfo), "hpatch");
return resultBuffer;
_clear:

View File

@@ -288,8 +288,10 @@ export class DownloadTask {
}
}
if(entry.filename !== '.DS_Store'){
await zip.decompressFile(entry.filename, params.unzipDirectory);
}
}
if (!foundDiff) {
throw new Error('diff.json not found');