conditionally wipe reg

This commit is contained in:
SpikeHD
2022-09-09 16:58:53 -07:00
parent 5e48a4772e
commit 80c28669e1

View File

@@ -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', {