Kaydet (Commit) 80207b31 authored tarafından Eda Altuntaş's avatar Eda Altuntaş

Gönderdeki hata çözüldü

üst 26c205fe
......@@ -57,12 +57,12 @@ const gotTheLock = app.requestSingleInstanceLock();
if (!gotTheLock) {
app.quit();
} else {
app.on("second-instance", () => {
app.on("second-instance", (event, args) => {
if (mainWindow) {
if (mainWindow.isMinimized()) mainWindow.restore();
mainWindow.focus();
}
require("./deep")(mainWindow);
require("./deep")(mainWindow, args);
});
app.on("ready", async () => {
if (isDevelopment && !process.env.IS_TEST) {
......
......@@ -3,9 +3,9 @@ const { spawn } = require("child_process");
const { copyFileSync, existsSync } = require("fs");
const { basename, join, posix } = require("path");
const handler = win => {
console.log(existsSync);
let file = process.argv.slice(process.argv.indexOf(process.execPath) + 1);
const handler = (win, args = null) => {
const argv = args || process.argv;
let file = argv.slice(argv.indexOf(process.execPath) + 1);
file = file.filter(f => existsSync(f));
if (file.length === 0) {
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment