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 }