Create Themes and Plugins folder if it doesnt't exist

Fixes #742
This commit is contained in:
Amaru8 2022-05-13 20:32:27 +02:00 committed by GitHub
parent 718967533d
commit 46560cdeae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -948,13 +948,23 @@ export class BrowserWindow {
switch (path) { switch (path) {
default: default:
case "plugins": case "plugins":
if (existsSync(utils.getPath("plugins"))) {
shell.openPath(utils.getPath("plugins")); shell.openPath(utils.getPath("plugins"));
} else {
mkdirSync(utils.getPath("plugins"));
shell.openPath(utils.getPath("plugins"));
}
break; break;
case "userdata": case "userdata":
shell.openPath(app.getPath("userData")); shell.openPath(app.getPath("userData"));
break; break;
case "themes": case "themes":
if (existsSync(utils.getPath("themes"))) {
shell.openPath(utils.getPath("themes")); shell.openPath(utils.getPath("themes"));
} else {
mkdirSync(utils.getPath("themes"));
shell.openPath(utils.getPath("themes"));
}
break; break;
} }
}); });