From 11848da0a102f7f7285c497c9e0519b0cf422503 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Fri, 9 Oct 2026 00:04:47 -0400 Subject: [PATCH] App: only a held lock means another launch is starting (#283 follow-up) A filesystem without lock support returned an error from try_lock, which read as 'held' and disabled crash detection for good. Co-Authored-By: Claude Opus 5.5 --- apps/effectcraft/src/launch_guard.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/effectcraft/src/launch_guard.rs b/apps/effectcraft/src/launch_guard.rs index 5636f988..14c4c440 100644 --- a/apps/effectcraft/src/launch_guard.rs +++ b/apps/effectcraft/src/launch_guard.rs @@ -40,7 +40,7 @@ impl Launch { let mut prefs = std::fs::read_to_string(&prefs_path).map(|t| Prefs::from_json(&t)).unwrap_or_default(); let marker = dir.join(MARKER); // Locked by another launch that is still opening its window: not a crash. - let held = File::open(&marker).is_ok_and(|f| f.try_lock().is_err()); + let held = File::open(&marker).is_ok_and(|f| matches!(f.try_lock(), Err(std::fs::TryLockError::WouldBlock))); let mut notice = None; if marker.exists() && !held && prefs.startup.window_graphics == "auto" && cfg!(not(target_os = "macos")) { prefs.startup.window_graphics = "gl".into();