Skip to content

A fast, helpful, and open-source document parser

wip: windows fixes

Astra Clelia Bertelli68655b5aab4f
diff --git a/crates/liteparse/src/conversion.rs b/crates/liteparse/src/conversion.rs
index 4df6b27..492976d 100644
--- a/crates/liteparse/src/conversion.rs
+++ b/crates/liteparse/src/conversion.rs
@@ -222,11 +222,16 @@ pub async fn is_path_executable(file_path: &str) -> bool {
if !meta.is_file() {
return false;
}
- if std::env::consts::FAMILY == "unix" {
+
+ #[cfg(unix)]
+ {
use std::os::unix::fs::PermissionsExt;
- meta.permissions().mode() & 0o111 != 0
- } else {
- true
+ return meta.permissions().mode() & 0o111 != 0;
+ }
+
+ #[cfg(windows)]
+ {
+ return true;
}
}
Err(_) => false,