if theme folder does not exist create one
This commit is contained in:
parent
fb65965d82
commit
0aaa40f4e5
1 changed files with 3 additions and 0 deletions
|
@ -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`
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue