From d8fae2f822d02e3602af295fad5f1905c4e24e65 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Sat, 29 Jun 2024 20:03:59 -0400 Subject: [PATCH] The frontier URL formats need to be switched around Otherwise, it will always pick up the old version --- src/execlookup.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/execlookup.rs b/src/execlookup.rs index 247cbc4..2a4bd1d 100644 --- a/src/execlookup.rs +++ b/src/execlookup.rs @@ -48,16 +48,16 @@ fn find_needle(installer_file: &[u8], needle: &str) -> Option { /// Extract the frontier URL from ffxivlauncher.exe pub fn extract_frontier_url(launcher_path: &str) -> Option { let installer_file = fs::read(launcher_path).unwrap(); - + + // New Frontier URL format + if let Some(url) = find_needle(&installer_file, "https://launcher.finalfantasyxiv.com") { + return Some(url); + } + // Old Frontier URL format if let Some(url) = find_needle(&installer_file, "https://frontier.ffxiv.com") { return Some(url); } - // New Frontier URL format - if let Some(url) = find_needle(&installer_file, "https://launcher.finalfantasyxiv.com") { - return Some(url); - } - None }