Skip to content

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

@n0samu

Description

@n0samu

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions