From 6bf9501acf7fe2300bacf362ebc261e1709b96bd Mon Sep 17 00:00:00 2001 From: 5ec1cff Date: Tue, 4 Feb 2025 17:22:55 +0800 Subject: [PATCH] ksud: fix stat --- userspace/ksud/src/magic_mount.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/userspace/ksud/src/magic_mount.rs b/userspace/ksud/src/magic_mount.rs index c6bd9f18..61727e48 100644 --- a/userspace/ksud/src/magic_mount.rs +++ b/userspace/ksud/src/magic_mount.rs @@ -283,7 +283,7 @@ fn do_magic_mount, WP: AsRef>( Symlink => true, Whiteout => real_path.exists(), _ => { - if let Ok(metadata) = real_path.metadata() { + if let Ok(metadata) = real_path.symlink_metadata() { let file_type = NodeFileType::from_file_type(metadata.file_type()) .unwrap_or(Whiteout); file_type != node.file_type || file_type == Symlink