Skip to content

Commit

Permalink
conditionally wipe reg
Browse files Browse the repository at this point in the history
  • Loading branch information
SpikeHD committed Sep 9, 2022
1 parent 5e48a47 commit 80c2866
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/ui/components/ServerLaunchSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,13 @@ export default class ServerLaunchSection extends React.Component<IProps, IState>
}
}

// First wipe registry if we have to
await invoke('wipe_registry', {
// The exe is always PascalCase so we can get the dir using regex
execName: (await getGameExecutable())?.split('.exe')[0].replace(/([a-z\d])([A-Z])/g, '$1 $2'),
})
if (config.wipe_login) {
// First wipe registry if we have to
await invoke('wipe_registry', {
// The exe is always PascalCase so we can get the dir using regex
execName: (await getGameExecutable())?.split('.exe')[0].replace(/([a-z\d])([A-Z])/g, '$1 $2'),
})
}

// Launch the program
const gameExists = await invoke('dir_exists', {
Expand Down

0 comments on commit 80c2866

Please sign in to comment.