Skip to content

Commit

Permalink
Fix crash
Browse files Browse the repository at this point in the history
Signed-off-by: 黑嫖233 <[email protected]>
  • Loading branch information
heipiao233 committed Feb 8, 2024
1 parent f80607f commit e8fdcda
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion locales/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.4.0-alpha.1
4.4.0-alpha.2
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/launcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/loaders/forgelike/forgelike.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export abstract class ForgeLikeLoader implements Loader<StoreData | ForgeMcmodIn
fs.writeFileSync(`${this.launcher.rootPath}/versions/${MCVersion.name}/${MCVersion.name}.json`, JSON.stringify(result));
fsextra.copyFile(`${installerPath}/${metadata.install.filePath}`, `${this.launcher.rootPath}/libraries/${expandMavenId(metadata.install.path)}`);
}
fsPromises.rmdir(installerPath);
fsPromises.rm(installerPath, {recursive: true, force: true});
return false;
}

Expand Down

0 comments on commit e8fdcda

Please sign in to comment.