From 6c88f618cfd5fd3385d4abb14aa27b2b4c8525d7 Mon Sep 17 00:00:00 2001 From: Elias Wendland <193786789+eliaswen@users.noreply.github.com> Date: Fri, 17 Jul 2026 21:15:59 +0200 Subject: [PATCH] fix: prevent redundant plugin path checks for /usr/bin directory --- src/plugin.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/plugin.rs b/src/plugin.rs index f904ade..88c0c0e 100644 --- a/src/plugin.rs +++ b/src/plugin.rs @@ -137,8 +137,11 @@ impl PluginRegistry { Ok(executable) => { tracing::trace!(executable = %executable.display(), "resolved current executable"); if let Some(parent) = executable.parent() { - directories.push(parent.to_path_buf()); - directories.push(parent.join("plugins")); + // Avoids checking the entire /usr/bin folder on every runtime, since there will never be a lib file there + if parent.to_path_buf() != PathBuf::from("/usr/bin") { + directories.push(parent.to_path_buf()); + directories.push(parent.join("plugins")); + } } } Err(error) => tracing::debug!(%error, "could not resolve current executable"),