💡 Code cleanup
This commit is contained in:
parent
1172d34a2b
commit
4aeba1709a
2 changed files with 4 additions and 3 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue