From ac34f318e442e44b507052d3e052a1a41bd91c77 Mon Sep 17 00:00:00 2001 From: maskers <97827489+mskrss@users.noreply.github.com> Date: Fri, 6 Jun 2025 11:09:34 +0300 Subject: [PATCH] `!` at the end of a folder name --- src/handlers/event/analyze_logs/issues.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/handlers/event/analyze_logs/issues.rs b/src/handlers/event/analyze_logs/issues.rs index fc013b6..2f77d43 100644 --- a/src/handlers/event/analyze_logs/issues.rs +++ b/src/handlers/event/analyze_logs/issues.rs @@ -38,6 +38,7 @@ pub async fn find(log: &str, data: &Data) -> Result> { flatpak_crash, spark_macos, xrandr, + folder_name, ]; let mut res: Vec<(String, String)> = issues.iter().filter_map(|issue| issue(log)).collect(); @@ -482,3 +483,17 @@ fn xrandr(log: &str) -> Issue { let found = log.contains("at org.lwjgl.opengl.LinuxDisplay.getAvailableDisplayModes"); found.then_some(issue) } + +fn folder_name(log: &str) -> Issue { + let issue = ( + "`!` in folder name".to_string(), + "Having a `!` in any folder is known to cause issues. If it's in your instance name, make sure to rename the actual instance folder, **not** the instance name in Prism." + .to_string(), + ); + + let found = Regex::new(r"Minecraft folder is:\n.*!/") + .unwrap() + .is_match(log); + + found.then_some(issue) +}