From e8fdcda3caf411cd55b81a033edc5729eb8d1957 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=91=E5=AB=96233?= Date: Thu, 8 Feb 2024 16:43:48 +0800 Subject: [PATCH] Fix crash MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 黑嫖233 --- locales/version | 2 +- package-lock.json | 4 ++-- package.json | 2 +- src/launcher.ts | 4 ++-- src/loaders/forgelike/forgelike.ts | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/locales/version b/locales/version index 67b3206..11a6ab7 100644 --- a/locales/version +++ b/locales/version @@ -1 +1 @@ -4.4.0-alpha.1 \ No newline at end of file +4.4.0-alpha.2 \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 9a0e80b..9707e36 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "dmclc", - "version": "4.4.0-alpha.1", + "version": "4.4.0-alpha.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "dmclc", - "version": "4.4.0-alpha.1", + "version": "4.4.0-alpha.2", "license": "MIT", "dependencies": { "compressing": "^1.9.1", diff --git a/package.json b/package.json index 0759786..829e57d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dmclc", - "version": "4.4.0-alpha.1", + "version": "4.4.0-alpha.2", "description": "Dolphin Minecraft Launcher Core", "typings": "./lib/index.d.ts", "module": "./lib/index.js", diff --git a/src/launcher.ts b/src/launcher.ts index 24cca02..8fee6bc 100644 --- a/src/launcher.ts +++ b/src/launcher.ts @@ -89,7 +89,7 @@ export class Launcher { }; envPaths = envPaths("DMCLC"); private realRootPath = ""; - static readonly version = "4.4.0-alpha.1"; + static readonly version = "4.4.0-alpha.2"; /** * Create a new Launcher object. * @throws {@link FormattedError} @@ -156,7 +156,7 @@ export class Launcher { private async init(lang: string) { if (fs.existsSync(`${homedir()}/.dmclc`)) { - await fsPromise.rmdir(`${homedir()}/.dmclc`); + await fsPromise.rm(`${homedir()}/.dmclc`, {recursive: true, force: true}); } if(os.platform() === "linux") { // Special thanks to HMCL. Sorry for I'm not able to check if this works properly. diff --git a/src/loaders/forgelike/forgelike.ts b/src/loaders/forgelike/forgelike.ts index e3e5010..3c48b3a 100644 --- a/src/loaders/forgelike/forgelike.ts +++ b/src/loaders/forgelike/forgelike.ts @@ -129,7 +129,7 @@ export abstract class ForgeLikeLoader implements Loader