disabled themes, replaced with styles

This commit is contained in:
booploops 2022-05-04 14:59:46 -07:00
parent deae018a9e
commit 019886ecb0
8 changed files with 77 additions and 54 deletions

View file

@ -715,6 +715,15 @@ export class BrowserWindow {
// validate the path is in the themes directory
try {
if (path.startsWith(themesDir)) {
// get last dir in path, can be either / or \ and may have a trailing slash
const themeName = path.split(/[\\\/]/).pop()
if(themeName == "Themes" || themeName == "themes") {
BrowserWindow.win.webContents.send("theme-uninstalled", {
path: path,
status: 3
});
return
}
// if path is directory, delete it
if (lstatSync(path).isDirectory()) {
await rmdirSync(path, { recursive: true });