From 4aeba1709a83dfe94892574fd8e9d375cfa65fc4 Mon Sep 17 00:00:00 2001 From: C-3PO Date: Fri, 22 Jun 2018 13:43:17 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=A1=20Code=20cleanup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/installPatch.ts | 6 ++++-- src/ssn/readSsnFile.ts | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/installPatch.ts b/src/installPatch.ts index 95f3207..b4c2830 100644 --- a/src/installPatch.ts +++ b/src/installPatch.ts @@ -3,14 +3,16 @@ import getSolidpkg from './ssn/getSolidpkg'; import readSsnFile from './ssn/readSsnFile'; (async () => { - //Read patchmanifest + //----- PATCHMANIFEST ----- + //.patchmanifest files contain a single XML file called "manifest.xml" const patchmanifestBuffer = await getPatchmanifest('assets_swtor_de_de'); console.log(patchmanifestBuffer.length, patchmanifestBuffer); const patchmanifestFiles = readSsnFile(patchmanifestBuffer); console.log(patchmanifestFiles); - //Read solidpkg + //----- SOLIDPKG ----- + //.solidpkg files contain a single Bencode file called "metafile.solid" const solidpkgBuffer = await getSolidpkg('assets_swtor_de_de', -1, 0); console.log(solidpkgBuffer.length, solidpkgBuffer); diff --git a/src/ssn/readSsnFile.ts b/src/ssn/readSsnFile.ts index 6c838a0..ae03a84 100644 --- a/src/ssn/readSsnFile.ts +++ b/src/ssn/readSsnFile.ts @@ -119,7 +119,6 @@ export default function readSsnFile(buffer: Buffer): ISsnFileEntry[] { if (fieldLength > 120) { throw new Error(`Password is too long, it should be 120 characters at most but it is ${fieldLength} characters long.`); } - const passwordLength = fieldLength; encodedPassword = new Uint8Array(arrayBuffer, pos, fieldLength); break; }