diff --git a/src/index.js b/src/index.js index 87016ba..2c96143 100644 --- a/src/index.js +++ b/src/index.js @@ -250,12 +250,13 @@ ipc.on("play", function(event, args) { lolClient.launch(replayServer.host(), replayServer.port(), replay.region, replay.gameId, replay.key, function(success) { mainWindow.restore(); - if (!success) + if (!success) { logger.error("Could not start league of legends client."); event.sender.send("error", { title: "LoL Client error", content: 'Could not start the League of Legends client
Please send us your current log file by clicking the button below and filling out the form.' }); + } }); }); diff --git a/src/modules/lol-client.js b/src/modules/lol-client.js index b998b27..834df1e 100644 --- a/src/modules/lol-client.js +++ b/src/modules/lol-client.js @@ -186,7 +186,7 @@ module.exports = function(extLogger) { callback(false); return; } - + // Set LoL client executable/app name let exe = ""; if (process.platform == "win32") { @@ -194,10 +194,10 @@ module.exports = function(extLogger) { } else if (process.platform == "darwin") { exe = "LeagueOfLegends.app"; } - + // Set arguments let args = ["8394", "LoLLauncher.exe", "", "spectator " + host + ":" + port + " " + replayKey + " " + replayGameId + " " + replayRegionName]; - + // Set options let opts = { stdio: "ignore" }; if (process.platform == "win32") { @@ -206,7 +206,7 @@ module.exports = function(extLogger) { opts.cwd = fullPath + exe + "/Contents/MacOS"; process.env["riot_launched"] = true; } - + // Set command let cmd = ""; if (process.platform == "win32") { @@ -214,7 +214,7 @@ module.exports = function(extLogger) { } else if (process.platform == "darwin") { cmd = opts.cwd + "/LeagueofLegends"; } - + // Check if client is executable fs.access(cmd, fs.X_OK, function (err) { if (err) {