From 9427bb36f62cbafddfff60ddcaf3494d7fb96f66 Mon Sep 17 00:00:00 2001 From: Danek Duvall Date: Thu, 3 Aug 2017 14:55:01 -0700 Subject: [PATCH] Fix a dangling symlink bug in `remove_dir_all()` on Solaris This fixes a handful of long-failing tests. --- src/libstd/sys/unix/fs.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/libstd/sys/unix/fs.rs b/src/libstd/sys/unix/fs.rs index 59dceba89532..4e6fde5c29de 100644 --- a/src/libstd/sys/unix/fs.rs +++ b/src/libstd/sys/unix/fs.rs @@ -284,12 +284,7 @@ impl DirEntry { lstat(&self.path()) } - #[cfg(target_os = "solaris")] - pub fn file_type(&self) -> io::Result { - stat(&self.path()).map(|m| m.file_type()) - } - - #[cfg(target_os = "haiku")] + #[cfg(any(target_os = "solaris", target_os = "haiku"))] pub fn file_type(&self) -> io::Result { lstat(&self.path()).map(|m| m.file_type()) }