if theme folder does not exist create one

This commit is contained in:
booploops 2022-02-11 19:07:05 -08:00
parent fb65965d82
commit 0aaa40f4e5

View file

@ -372,6 +372,9 @@ export class BrowserWindow {
}); });
ipcMain.on("get-github-theme", async (event, url) => { ipcMain.on("get-github-theme", async (event, url) => {
if (!existsSync(utils.getPath("themes"))) {
mkdirSync(utils.getPath("themes"));
}
if (url.endsWith("/")) url = url.slice(0, -1); if (url.endsWith("/")) url = url.slice(0, -1);
let response = await fetch( let response = await fetch(
`${url}/archive/refs/heads/main.zip` `${url}/archive/refs/heads/main.zip`