Skip to content

Commit db44c6e

Browse files
committed
fix: make is_executable() more permissive by taking the group and 'other' permissions into account.
1 parent a4801fe commit db44c6e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gix-fs/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ pub struct Stack {
7777
}
7878

7979
#[cfg(unix)]
80-
/// Returns whether a a file has the executable permission set.
80+
/// Returns whether a file has the executable permission set.
8181
pub fn is_executable(metadata: &std::fs::Metadata) -> bool {
8282
use std::os::unix::fs::MetadataExt;
83-
(metadata.mode() & 0o100) != 0
83+
(metadata.mode() & 0o111) != 0
8484
}
8585

8686
/// Classifiers for IO-errors.

0 commit comments

Comments
 (0)