mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-30 08:50:48 +01:00
fix(rust-volume-server): check executable extension on non-unix instead of always true
This commit is contained in:
1 parent
661d8df4d9
commit
07954a03c0
1 file changed
+8
-1
@@ -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)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user