-
-
Notifications
You must be signed in to change notification settings - Fork 480
[FIX] Issues with Epic Login and refresh Library #1073
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, it's a band-aid fix that's surely gonna bite us in the butt in the future
But it's still a fix
Works on Linux and my Win VM
Ahahaha I was thinking that we should make a global function that could be used across the legendary and the gogdl parts. So we could receive the full path for the binary and do the necessary treatments/checks for it to run. But one thing I learned today was this |
b1e2582
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using process.chdir
works, but I fear that we'll get very hard-to-find issues like this if every function would start using it (since then you never know in which directory we're in right now, and it's easy to miss one of these and get unexplainable issues)
electron/constants.ts
Outdated
// unfortunatelly this cant go into utils since it needs to be loaded on app start | ||
function fixPathWithSpaces(path: string) { | ||
// to detect on with os user had used path.resolve(...) | ||
const is_posix_os = !isWindows |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels kinda unnecessary, why not just do if (!isWindows)
below?
electron/constants.ts
Outdated
const should_not_escape = (major_release = '', os_build = '') => | ||
/1\d+\.\d+/.test(major_release) && Number(os_build) >= 17134.1184 | ||
|
||
if (is_posix_os) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be higher up, so the regex isn't applied when it's not used anyway
@@ -145,10 +145,14 @@ async function launch( | |||
) { | |||
let command = '' | |||
if (runner == 'legendary') { | |||
command = `${legendaryBin} launch ${appName} ${exe} ${runOffline} ${ | |||
const legendaryPath = dirname(legendaryBin).replaceAll('"', '') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be defined once in constants.ts
? Setting it in like 5 different places does not seem like a good idea
@CommandMC yes, I believe using |
Wait a minute, doesn't spawn have a |
spawn
methods so binaries with spaces can work normallyUse the following Checklist if you have changed something on the Backend or Frontend: