diff --git a/src/fs/metadata.rs b/src/fs/metadata.rs index 1c92b93b0..476524ee4 100644 --- a/src/fs/metadata.rs +++ b/src/fs/metadata.rs @@ -86,7 +86,12 @@ impl JoshutoMetadata { #[cfg(not(target_os = "macos"))] let sflag = SFlag::from_bits_truncate(metadata_mode); + #[cfg(target_os = "macos")] + let mode = Mode::from_bits_truncate(metadata_mode as mode_t); + + #[cfg(not(target_os = "macos"))] let mode = Mode::from_bits_truncate(metadata_mode); + (FileType::from_mode(sflag), mode) } _ => (FileType::File, Mode::empty()),