aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/util/filesystem.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/util/filesystem.rs')
-rw-r--r--crates/shirabe/src/util/filesystem.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/shirabe/src/util/filesystem.rs b/crates/shirabe/src/util/filesystem.rs
index 532c96dd..44dddb8c 100644
--- a/crates/shirabe/src/util/filesystem.rs
+++ b/crates/shirabe/src/util/filesystem.rs
@@ -1021,11 +1021,10 @@ impl Filesystem {
let stat = lstat(junction);
// S_ISDIR test (S_IFDIR is 0x4000, S_IFMT is 0xF000 bitmask)
- if let Some(arr) = stat {
- let mode = arr.get("mode").and_then(|v| v.as_int()).unwrap_or(0);
- return 0x4000 != (mode & 0xF000);
+ match stat {
+ Some(stat) => 0x4000 != (stat.mode & 0xF000),
+ None => false,
}
- false
}
/// Removes a Windows NTFS junction.