ksud: fix stat

This commit is contained in:
5ec1cff
2025-02-04 17:22:55 +08:00
parent 301390faca
commit 6bf9501acf

View File

@@ -283,7 +283,7 @@ fn do_magic_mount<P: AsRef<Path>, WP: AsRef<Path>>(
Symlink => true, Symlink => true,
Whiteout => real_path.exists(), 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()) let file_type = NodeFileType::from_file_type(metadata.file_type())
.unwrap_or(Whiteout); .unwrap_or(Whiteout);
file_type != node.file_type || file_type == Symlink file_type != node.file_type || file_type == Symlink