fix pathfinding

This commit is contained in:
Cynthia Foxwell 2017-12-13 13:31:09 -07:00
parent d518795226
commit 6d1ab8130f

View file

@ -34,7 +34,7 @@ var cleanup = function () {
require("electron").remote.getCurrentWindow().loadURL(`https://${(dir.toLowerCase().indexOf("discordcanary") > -1 && "canary.") || (dir.toLowerCase().indexOf("discordptb") > -1 && "ptb.") || ""}discordapp.com/channels/@me`); require("electron").remote.getCurrentWindow().loadURL(`https://${(dir.toLowerCase().indexOf("discordcanary") > -1 && "canary.") || (dir.toLowerCase().indexOf("discordptb") > -1 && "ptb.") || ""}discordapp.com/channels/@me`);
} }
var _discord_branch = approot().split('app.asar')[0].replace(/\\/g,"/"); var _discord_branch = (remote.app.getAppPath()+"/../").split('app.asar')[0].replace(/\\/g,"/");
var setup = function () { var setup = function () {
cacheclear(); cacheclear();
@ -49,13 +49,13 @@ var setup = function () {
logging.innerText += "Cynergy is not installed\n"; logging.innerText += "Cynergy is not installed\n";
logging.innerText += "Injecting dom-ready listener into app.asar\n"; logging.innerText += "Injecting dom-ready listener into app.asar\n";
try { try {
if(dir.toLowerCase().indexOf("discordcanary") > -1 || dir.toLowerCase().indexOf("discorddevelopment") > -1){ if(_discord_branch.toLowerCase().indexOf("discordcanary") > -1 || _discord_branch.toLowerCase().indexOf("discorddevelopment") > -1){
new_injector(); new_injector();
}else{ }else{
asarpwn(); asarpwn();
} }
} catch (e) { } catch (e) {
if(dir.toLowerCase().indexOf("discordcanary") > -1 || dir.toLowerCase().indexOf("discorddevelopment") > -1){ if(_discord_branch.toLowerCase().indexOf("discordcanary") > -1 || _discord_branch.toLowerCase().indexOf("discorddevelopment") > -1){
logging.innerText += "New injector failed.\n"; logging.innerText += "New injector failed.\n";
logging.innerText += `${e}\n`; logging.innerText += `${e}\n`;
}else{ }else{