diff --git a/src/ssn/verify/verifyPatch.ts b/src/ssn/verify/verifyPatch.ts index fc0c480..e8d82a2 100644 --- a/src/ssn/verify/verifyPatch.ts +++ b/src/ssn/verify/verifyPatch.ts @@ -15,7 +15,7 @@ export default function verifyPatch(fileEntries: ISsnFileEntry[], product: Produ const validLastFileAlternate = `Assets/${product}_version.txt`; if (lastFile.name === validLastFileName) { if (lastFile.diffType !== SsnDiffType.NewFile) { - throw new Error(`Last file (.version file) must have diffType 0 but it had diffType ${lastFile.diffType}.`); + throw new Error(`Last file (.version file) must have diffType 0but it had diffType ${lastFile.diffType}.`); } } else if (lastFile.name === validLastFileAlternate) { //In some early patches, the last file is *_version.txt and the second to last is *.version @@ -29,8 +29,8 @@ export default function verifyPatch(fileEntries: ISsnFileEntry[], product: Produ if (secondToLastFile.name !== validLastFileName) { throw new Error(`Last or second to last file must be called "${validLastFileName}" but it was "${secondToLastFile.name}".`); } - if (secondToLastFile.diffType !== SsnDiffType.NewFile) { - throw new Error(`Second to last file (.version file) must have diffType 0 but it had diffType ${secondToLastFile.diffType}.`); + if (secondToLastFile.diffType !== SsnDiffType.Changed) { + throw new Error(`Second to last file (.version file) must have diffType 2 but it had diffType ${secondToLastFile.diffType}.`); } } else { throw new Error(`Last file must be called "${validLastFileName}" or "${validLastFileAlternate}" but it was "${lastFile.name}".`);