Skip to content
This repository was archived by the owner on Jul 23, 2023. It is now read-only.

Commit 8cbb7e5

Browse files
authored
Fix open mod in explorer (#64)
* Create OWML dir if not existing * Fix open mod in explorer
1 parent 9c272df commit 8cbb7e5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/services/mod-manager.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import unzip from 'unzipper';
22
import request from 'request';
33
import fs from 'fs-extra';
44
import path from 'path';
5-
import { shell, remote } from 'electron';
5+
import { shell } from 'electron';
66

77
export function isInstalled(mod: Mod): boolean {
88
return !!mod.localVersion;
@@ -131,13 +131,13 @@ export function openDirectory(mod: Mod) {
131131
if (!mod.modPath) {
132132
throw new Error("Can't open directory mod path is not defined");
133133
}
134-
shell.openItem(`${remote.app.getAppPath()}/${mod.modPath}`);
134+
shell.openItem(path.resolve(mod.modPath));
135135
}
136136

137137
export function openRepo(mod: Mod) {
138138
if (!mod.repo) {
139139
throw new Error(
140-
"Can't open repository because theere's no registered repository URL",
140+
"Can't open repository because there's no registered repository URL",
141141
);
142142
}
143143
shell.openExternal(`https://github.com/${mod.repo}`);

0 commit comments

Comments
 (0)