fix boot path detection for newer logs

This commit is contained in:
13xforever 2019-04-21 01:28:59 +05:00
parent 8e2ef259ed
commit a6193f211d
2 changed files with 5 additions and 1 deletions

View File

@ -142,6 +142,7 @@ namespace CompatBot.EventHandlers.LogParsing
["LDR: Game:"] = new Regex(@"Game: .*(?<ldr_game>/dev_hdd0/game/(?<ldr_game_serial>[^/\r\n]+).*?)\r?$", DefaultOptions),
["LDR: Disc"] = new Regex(@"Disc( path)?: .*(?<ldr_disc>/dev_hdd0/game/(?<ldr_disc_serial>[^/\r\n]+).*?)\r?$", DefaultOptions),
["LDR: Path:"] = new Regex(@"Path: .*(?<ldr_path>/dev_hdd0/game/(?<ldr_path_serial>[^/\r\n]+).*?)\r?$", DefaultOptions),
["LDR: Boot path:"] = new Regex(@"Boot path: .*(?<ldr_boot_path>/dev_hdd0/game/(?<ldr_boot_path_serial>[^/\r\n]+).*?)\r?$", DefaultOptions),
["Elf path:"] = new Regex(@"Elf path: (?<host_root_in_boot>/host_root/)?(?<elf_boot_path>.*?)\r?$", DefaultOptions),
["Invalid or unsupported file format:"] = new Regex(@"Invalid or unsupported file format: (?<failed_to_boot>.*?)\r?$", DefaultOptions),
["SELF:"] = new Regex(@"(?<failed_to_decrypt>Failed to decrypt)? SELF: (?<failed_to_decrypt>Failed to (decrypt|load SELF))?.*\r?$", DefaultOptions),

View File

@ -73,7 +73,10 @@ namespace CompatBot.Utils.ResultFormatters
if (!string.IsNullOrEmpty(items["host_root_in_boot"]) && isEboot)
notes.Add("❌ Retail game booted as an ELF through the `/root_host/`, probably due to passing path as an argument; please boot through the game library list for now");
if (serial.StartsWith("NP") && items["ldr_game_serial"] != serial && items["ldr_path_serial"] != serial)
if (serial.StartsWith("NP")
&& items["ldr_game_serial"] != serial
&& items["ldr_path_serial"] != serial
&& items["ldr_boot_path_serial"] != serial)
notes.Add("❌ Digital version of the game outside of `/dev_hdd0/game/` directory");
if (!string.IsNullOrEmpty(items["serial"]) && isElf)
notes.Add($"⚠ Retail game booted directly through `{Path.GetFileName(elfBootPath)}`, which is not recommended");