about summary refs log tree commit diff
path: root/src/libstd/sys
diff options
context:
space:
mode:
authorDanek Duvall <danek.duvall@oracle.com>2017-08-03 14:55:01 -0700
committerDanek Duvall <danek.duvall@oracle.com>2017-08-03 14:55:01 -0700
commit9427bb36f62cbafddfff60ddcaf3494d7fb96f66 (patch)
treee6be6b0ac0ecd503aaa6d4408bcc476d0f1e4f65 /src/libstd/sys
parent4596c71fc5556966a86a226f55f0d0deb9493e60 (diff)
downloadrust-9427bb36f62cbafddfff60ddcaf3494d7fb96f66.tar.gz
rust-9427bb36f62cbafddfff60ddcaf3494d7fb96f66.zip
Fix a dangling symlink bug in `remove_dir_all()` on Solaris
This fixes a handful of long-failing tests.
Diffstat (limited to 'src/libstd/sys')
-rw-r--r--src/libstd/sys/unix/fs.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/libstd/sys/unix/fs.rs b/src/libstd/sys/unix/fs.rs
index 59dceba8953..4e6fde5c29d 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<FileType> {
-        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<FileType> {
         lstat(&self.path()).map(|m| m.file_type())
     }