From 07954a03c00c89d144271ee93fe5a4c46552ac11 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sat, 24 Oct 2026 21:41:37 -0700 Subject: [PATCH] fix(rust-volume-server): check executable extension on non-unix instead of always true --- rust/volume_server/src/main.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/rust/volume_server/src/main.rs b/rust/volume_server/src/main.rs index a11c06dafb..d2de76af07 100644 --- a/rust/volume_server/src/main.rs +++ b/rust/volume_server/src/main.rs @@ -1234,6 +1234,13 @@ fn is_executable_file(path: &PathBuf) -> bool { } #[cfg(not(unix))] { - true + path.extension() + .and_then(|e| e.to_str()) + .map(|e| { + ["exe", "bat", "cmd", "com"] + .iter() + .any(|x| e.eq_ignore_ascii_case(x)) + }) + .unwrap_or(false) } }