diff --git a/rust/src/passwd.rs b/rust/src/passwd.rs index 821497d82d..99004ac4d5 100644 --- a/rust/src/passwd.rs +++ b/rust/src/passwd.rs @@ -232,7 +232,7 @@ fn dir_contains_uid_gid(dir: &Dir, uid: &Option, gid: &Option) -> Resu let subdir = dir.open_dir(dir_entry.file_name())?; dir_contains_uid_gid(&subdir, uid, gid)? } else { - let metadata = dir.metadata(dir_entry.file_name())?; + let metadata = dir_entry.metadata()?; compare_uid_gid(metadata, uid, gid) };