From 80c28669e1e717c63e5f9f6c14d88246b5e40085 Mon Sep 17 00:00:00 2001 From: SpikeHD Date: Fri, 9 Sep 2022 16:58:53 -0700 Subject: [PATCH] conditionally wipe reg --- src/ui/components/ServerLaunchSection.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/ui/components/ServerLaunchSection.tsx b/src/ui/components/ServerLaunchSection.tsx index fe7d705..984c26f 100644 --- a/src/ui/components/ServerLaunchSection.tsx +++ b/src/ui/components/ServerLaunchSection.tsx @@ -185,11 +185,13 @@ export default class ServerLaunchSection extends React.Component } } - // 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', {