From a74c908f9ef6133cd2b6d984b0c6683e418e99ba Mon Sep 17 00:00:00 2001 From: heipiao233 Date: Wed, 2 Aug 2023 19:48:10 +0800 Subject: [PATCH] Hotfix --- src/launcher.ts | 2 +- src/mods/download/modrinth/ModrinthContentService.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/launcher.ts b/src/launcher.ts index 227bd08..94d3fad 100644 --- a/src/launcher.ts +++ b/src/launcher.ts @@ -137,7 +137,7 @@ export class Launcher { }; } } - if (!fs.existsSync("./locales") || (await fs.promises.readFile("./locales/version")).toString().trim() !== this.version) { + if (!fs.existsSync("./locales") || (await fs.promises.readFile("./locales/version")).toString().trim() !== Launcher.version) { await download("https://heipiao233.github.io/dmclc/locales.tar.gz", "./locales.tar.gz", this); await compressing.tgz.uncompress("./locales.tar.gz", "."); } diff --git a/src/mods/download/modrinth/ModrinthContentService.ts b/src/mods/download/modrinth/ModrinthContentService.ts index 5bc234d..c087b85 100644 --- a/src/mods/download/modrinth/ModrinthContentService.ts +++ b/src/mods/download/modrinth/ModrinthContentService.ts @@ -182,7 +182,7 @@ export default class ModrinthContentService implements ContentService { this.got = got.extend({ prefixUrl: "https://api.modrinth.com/v2/", headers: { - "user-agent": `${this.launcher.name}, using heipiao233/dmclc/${this.launcher.version} (heipiao233@outlook.com)` + "user-agent": `${this.launcher.name}, using heipiao233/dmclc/${Launcher.version} (heipiao233@outlook.com)` } }); }