fix(rust-volume-server): check executable extension on non-unix instead of always true

This commit is contained in:
Chris Lu committed 2026-10-24 21:41:37 -07:00
1 parent 661d8df4d9
commit 07954a03c0
1 file changed
+8 -1
+8 -1
View File
@@ -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)
}
}