Skip to content

Commit

Permalink
add checksum mismatch detection
Browse files Browse the repository at this point in the history
  • Loading branch information
maskersss authored and Scrumplex committed Nov 12, 2024
1 parent 51abe9e commit 75cad69
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/handlers/event/analyze_logs/issues.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ pub async fn find(log: &str, data: &Data) -> Result<Vec<(String, String)>> {
java_32_bit,
intermediary_mappings,
old_forge_new_java,
checksum_mismatch,
];

let mut res: Vec<(String, String)> = issues.iter().filter_map(|issue| issue(log)).collect();
Expand Down Expand Up @@ -400,3 +401,15 @@ fn old_forge_new_java(log: &str) -> Issue {
);
found.then_some(issue)
}

fn checksum_mismatch(log: &str) -> Issue {
let issue = (
"Outdated cached files".to_string(),
"It looks like you need to delete cached files.
To do that, press Folders ⟶ View Launcher Root Folder, and **after closing the launcher** delete the folder named \"meta\"."
.to_string(),
);

let found = log.contains("Checksum mismatch, download is bad.");
found.then_some(issue)
}

0 comments on commit 75cad69

Please sign in to comment.