Skip to content
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

[BUG] Relative Flashpoint Path is highlighted in red on MacOS even when valid #378

Open
n0samu opened this issue Aug 17, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@n0samu
Copy link
Member

n0samu commented Aug 17, 2022

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Set a valid relative Flashpoint Path in MacOS, such as ../ (when using our current Flashpoint folder structure)
  2. After clicking "Save and Restart" Flashpoint will work fine. Yet the path will still be highlighted in red on the Config tab.

Expected behavior
When typing in a valid relative Flashpoint Path, the text box highlight should change to green.

Screenshots
image

Desktop (please complete the following information):

  • OS: MacOS 10.15 Catalina
  • Launcher version: 10.1.7 (prerelease)

Additional context
The problem is in renderer/Util.ts:

// @TODO Move this to the back process
export function isFlashpointValidCheck(flashpointPath: string): Promise<boolean> {
  return new Promise(resolve => fs.stat(path.join(flashpointPath, 'FPSoftware'), error => resolve(!error)));
}

On MacOS, we need to resolve the Flashpoint Path path relative to the path to the launcher's .app package, rather than relative to the executable file (which is inside the .app package).

@n0samu n0samu added the bug Something isn't working label Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant