From 23cec2420b8c3afdb3749a52a88d220fc38faa2a Mon Sep 17 00:00:00 2001 From: mtkennerly Date: Sun, 23 Jun 2024 07:23:17 -0400 Subject: [PATCH] #209: Fix Lutris root auto-detection --- src/resource/config.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/resource/config.rs b/src/resource/config.rs index b720c3d..4a823a5 100644 --- a/src/resource/config.rs +++ b/src/resource/config.rs @@ -1326,14 +1326,12 @@ impl Config { None }; - if self.roots.iter().any(|root| match root { - Root::Lutris(stored) => { - stored.path.equivalent(&path) && (stored.database.is_some() || database.is_none()) + for root in &self.roots { + if let Root::Lutris(stored) = root { + if stored.path.equivalent(&path) && (stored.database.is_some() || database.is_none()) { + continue 'lutris; + } } - _ => true, - }) || checked.contains(&path) - { - continue; } roots.push(Root::Lutris(root::Lutris {