From a7e9a288f2a72134302dad58ad217dbe56f067db Mon Sep 17 00:00:00 2001 From: C-3PO Date: Mon, 9 Jul 2018 16:04:17 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fixed=20download=20URL=20for=20r?= =?UTF-8?q?etailclient=20products?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ssn/getPatch.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ssn/getPatch.ts b/src/ssn/getPatch.ts index f56f8a6..26bf306 100644 --- a/src/ssn/getPatch.ts +++ b/src/ssn/getPatch.ts @@ -52,7 +52,11 @@ export default async function getPatch({ product, from, to, sourceDirectory, tar const solidpkg = await getSolidpkg(product, from, to); function createUrlObject({ name, length }: {name: string, length: number}) { - return { host: 'cdn-patch.swtor.com', path: `/patch/${product}/${product}_${from}to${to}/${name}`, size: length }; + return { + host: 'cdn-patch.swtor.com', + path: `/patch/${product.startsWith('retailclient_') ? `${product.substring(13)}/` : ''}${product}/${product}_${from}to${to}/${name}`, + size: length, + }; } //start download, making sure that .zip file downloads first