Skip to content

Commit

Permalink
Merge pull request #364 from LindirQuenya/fix/mac-fp-path
Browse files Browse the repository at this point in the history
Don't make fp path absolute, just chdir.
  • Loading branch information
colin969 authored Jul 24, 2022
2 parents 4b95651 + ca24c05 commit 20bea06
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/back/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,10 +283,9 @@ async function onProcessMessage(message: any, sendHandle: any): Promise<void> {

console.log('Back - Loaded Config');

// If we're on mac and the flashpoint path is relative, resolve it relative to the configFolder path.
state.config.flashpointPath = process.platform == 'darwin' && state.config.flashpointPath[0] != '/'
? path.resolve(state.configFolder, state.config.flashpointPath)
: state.config.flashpointPath;
if (process.platform === 'darwin') {
process.chdir(state.configFolder);
}

const loadPrefs = async (): Promise<void> => {
// @TODO Figure out why async loading isn't always working?
Expand Down

0 comments on commit 20bea06

Please sign in to comment.