Use openPath workaround on windows

Fixes #1700
This commit is contained in:
2024-02-21 19:05:28 -05:00
parent 7492e7eb11
commit 5f732bb5bf
7 changed files with 23 additions and 8 deletions
+2 -1
View File
@@ -11,13 +11,14 @@ import Events from "./emitter";
import DataStore from "./datastore";
import React from "./react";
import Strings from "./strings";
import ipc from "./ipc";
import AddonEditor from "@ui/misc/addoneditor";
import FloatingWindows from "@ui/floatingwindows";
import Toasts from "@ui/toasts";
const openItem = shell.openItem || shell.openPath;
const openItem = ipc.openPath;
const splitRegex = /[^\S\r\n]*?\r?(?:\r\n|\n)[^\S\r\n]*?\*[^\S\r\n]?/;
const escapedAtRegex = /^\\@/;
+4
View File
@@ -60,4 +60,8 @@ export default new class IPCRenderer {
getSystemAccentColor() {
return ipc.invoke(IPCEvents.GET_ACCENT_COLOR);
}
openPath(path) {
return ipc.send(IPCEvents.OPEN_PATH, path);
}
};
+2 -3
View File
@@ -3,6 +3,7 @@ import Strings from "@modules/strings";
import Events from "@modules/emitter";
import DataStore from "@modules/datastore";
import DiscordModules from "@modules/discordmodules";
import ipc from "@modules/ipc";
import SettingsTitle from "./title";
import AddonCard from "./addoncard";
@@ -37,9 +38,7 @@ const buildDirectionOptions = () => [
function openFolder(folder) {
const shell = require("electron").shell;
const open = shell.openItem || shell.openPath;
open(folder);
ipc.openPath(folder);
}
function blankslate(type, onClick) {