1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-03-02 03:39:21 +00:00

Changed electron fs-job to invoke, for simplefying storage (#1106)

* Changed electron fs-job to invoke, for simplefying storage
(And it helps for the modloader)

* Reverted some unneeded chages

* Uploaded wrong file

* Removed uneeded promise
This commit is contained in:
Thomas (DJ1TJOO)
2021-03-16 17:59:23 +01:00
committed by GitHub
parent 7f2132d763
commit 22b8777aa0
2 changed files with 39 additions and 51 deletions

View File

@@ -1,9 +1,8 @@
/* eslint-disable quotes,no-undef */
const { app, BrowserWindow, Menu, MenuItem, session } = require("electron");
const { app, BrowserWindow, Menu, MenuItem, ipcMain, shell } = require("electron");
const path = require("path");
const url = require("url");
const { ipcMain, shell } = require("electron");
const fs = require("fs");
const steam = require("./steam");
const asyncLock = require("async-lock");
@@ -287,10 +286,7 @@ async function performFsJob(job) {
}
}
ipcMain.on("fs-job", async (event, arg) => {
const result = await performFsJob(arg);
event.reply("fs-response", { id: arg.id, result });
});
ipcMain.handle("fs-job", (event, arg) => performFsJob(arg));
steam.init(isDev);
steam.listen();