Hotfix bugs: path issue in Windows (#331)

* fix speech not loaded

* fix path issue in windows
This commit is contained in:
an-lee
2024-02-20 11:48:20 +08:00
committed by GitHub
parent bc48810e4d
commit d8a8b5db1f
5 changed files with 5 additions and 5 deletions

View File

@@ -43,7 +43,7 @@ protocol.registerSchemesAsPrivileged([
app.on("ready", async () => {
protocol.handle("enjoy", (request) => {
let url = request.url.replace("enjoy://", "");
if (url.match(/library\/(audios|videos|recordings)/g)) {
if (url.match(/library\/(audios|videos|recordings|speeches)/g)) {
url = url.replace("library/", "");
url = path.join(settings.userDataPath(), url);
} else if (url.startsWith("library")) {