diff --git a/.gitignore b/.gitignore index 37ecde4..ff382c5 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ .env.development.local .env.test.local .env.production.local +.vs npm-debug.log* yarn-debug.log* diff --git a/src-tauri/src/system_helpers.rs b/src-tauri/src/system_helpers.rs index cc1282c..a34a916 100644 --- a/src-tauri/src/system_helpers.rs +++ b/src-tauri/src/system_helpers.rs @@ -94,7 +94,7 @@ pub fn install_location() -> String { } #[tauri::command] -pub fn set_migoto_target(path: String, migoto_path: String) -> bool { +pub fn set_migoto_target(_path: String, migoto_path: String) -> bool { let mut migoto_pathbuf = PathBuf::from(migoto_path); migoto_pathbuf.pop(); diff --git a/src/ui/Main.tsx b/src/ui/Main.tsx index b1cbf3c..19967d0 100644 --- a/src/ui/Main.tsx +++ b/src/ui/Main.tsx @@ -72,10 +72,8 @@ export class Main extends React.Component { if (wasPatched) { const unpatched = await unpatchGame() - if (!unpatched) { - alert( - `Could not unpatch game! (Delete version.dll in your game folder)` - ) + if (unpatched) { + alert(`Could not unpatch game! (Delete version.dll in your game folder)`) } } }) diff --git a/src/utils/rsa.ts b/src/utils/rsa.ts index 72c86d8..0f48e9d 100644 --- a/src/utils/rsa.ts +++ b/src/utils/rsa.ts @@ -58,9 +58,10 @@ export async function patchGame() { } // Copy the patch to game files - const replaced = await invoke('copy_file', { + const replaced = await invoke('copy_file_with_new_name', { path: (await getBackupRSAPath()) + '\\version.dll', newPath: await getGameRSAPath(), + newName: 'version.dll', }) if (!replaced) { @@ -86,7 +87,7 @@ export async function getGameRSAPath() { return null } - return gameData + return (gameData + '\\').replace(/\\/g, '/') } export async function getBackupRSAPath() { @@ -107,4 +108,4 @@ export async function downloadRSA(manager: DownloadHandler) { }) return true -} \ No newline at end of file +}