Show More
@@ -414,6 +414,8 b' impl Node {' | |||||
414 | } |
|
414 | } | |
415 |
|
415 | |||
416 | fn synthesize_unix_mode(&self) -> u32 { |
|
416 | fn synthesize_unix_mode(&self) -> u32 { | |
|
417 | // Some platforms' libc don't have the same type (MacOS uses i32 here) | |||
|
418 | #[allow(clippy::unnecessary_cast)] | |||
417 | let file_type = if self.flags().contains(Flags::MODE_IS_SYMLINK) { |
|
419 | let file_type = if self.flags().contains(Flags::MODE_IS_SYMLINK) { | |
418 | libc::S_IFLNK as u32 |
|
420 | libc::S_IFLNK as u32 | |
419 | } else { |
|
421 | } else { | |
@@ -529,6 +531,8 b' impl Node {' | |||||
529 | flags.set(Flags::WDIR_TRACKED, wc_tracked); |
|
531 | flags.set(Flags::WDIR_TRACKED, wc_tracked); | |
530 | flags.set(Flags::P1_TRACKED, p1_tracked); |
|
532 | flags.set(Flags::P1_TRACKED, p1_tracked); | |
531 | flags.set(Flags::P2_INFO, p2_info); |
|
533 | flags.set(Flags::P2_INFO, p2_info); | |
|
534 | // Some platforms' libc don't have the same type (MacOS uses i32 here) | |||
|
535 | #[allow(clippy::unnecessary_cast)] | |||
532 | let size = if let Some((m, s)) = mode_size_opt { |
|
536 | let size = if let Some((m, s)) = mode_size_opt { | |
533 | let exec_perm = m & (libc::S_IXUSR as u32) != 0; |
|
537 | let exec_perm = m & (libc::S_IXUSR as u32) != 0; | |
534 | let is_symlink = m & (libc::S_IFMT as u32) == libc::S_IFLNK as u32; |
|
538 | let is_symlink = m & (libc::S_IFMT as u32) == libc::S_IFLNK as u32; |
General Comments 0
You need to be logged in to leave comments.
Login now