diff --git a/src/linux/namespaces.rs b/src/linux/namespaces.rs index 13473ed..382f130 100644 --- a/src/linux/namespaces.rs +++ b/src/linux/namespaces.rs @@ -527,7 +527,5 @@ fn normalize_path(path: &Path) -> PathBuf { /// Check if a path contains any symlinks. fn path_has_symlinks(path: &Path) -> bool { - path.ancestors() - .flat_map(|path| path.symlink_metadata().ok()) - .any(|metadata| metadata.is_symlink()) + path.ancestors().any(|path| path.read_link().is_ok()) }