From d94f3704779b31b5681e2269293f8ef4053ed28d Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Tue, 19 Jul 2022 21:38:07 -0500 Subject: [PATCH] Use local FileApi --- helpers/scanner/client.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/helpers/scanner/client.js b/helpers/scanner/client.js index 9dccd5b..d1965e6 100644 --- a/helpers/scanner/client.js +++ b/helpers/scanner/client.js @@ -3,7 +3,7 @@ import bufferApi from 'buffer' import * as zip from '@zip.js/zip.js' // import FileApi from 'file-api' - +import * as FileApi from '~/helpers/scanner/file-api.js' import { isString, isNonEmptyString } from '~/helpers/check-types.js' import { parsePlistBuffer } from '~/helpers/scanner/parsers/plist.js' // import { extractMachoMeta } from '~/helpers/scanner/parsers/macho.js' @@ -272,14 +272,14 @@ export class AppScan { // Get blob data from zip // https://gildas-lormeau.github.io/zip.js/core-api.html#zip-entry - const bundleExecutableBlob = await this.readFileEntryData( fileEntry, zip.Uint8ArrayWriter ) + const bundleExecutableUint8Array = await this.readFileEntryData( fileEntry, zip.Uint8ArrayWriter ) // console.log( 'bundleExecutableBlob', bundleExecutableBlob.buffer ) - const machoFileInstance = new File({ + const machoFileInstance = new FileApi.File({ name: this.bundleExecutable.filename, type: 'application/x-mach-binary', - buffer: bundleExecutableBlob, + buffer: bundleExecutableUint8Array, }) this.machoMeta = await extractMachoMeta({ machoFileInstance, FileApi })