add checksum mismatch detection

This commit is contained in:
maskers 2024-10-23 20:22:23 +03:00 committed by Sefa Eyeoglu
parent 51abe9e7c8
commit c7bee19ab1

View file

@ -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();
@ -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)
}