about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-01-14 11:03:25 +0000
committerbors <bors@rust-lang.org>2017-01-14 11:03:25 +0000
commitb4c0207148f58163af00d81428bdc74da651928c (patch)
treea402a117050f911fc7a438b0f4b67a981286e007 /src/libstd
parent7d82d95af9c54c3947f6c6e21a6d632d9ee468de (diff)
parentca2ade1d36d0b33d60ff1973ab6c8f3b09bc4c41 (diff)
downloadrust-b4c0207148f58163af00d81428bdc74da651928c.tar.gz
rust-b4c0207148f58163af00d81428bdc74da651928c.zip
Auto merge of #38935 - redox-os:fix_path_redox, r=brson
Fix is_absolute on Redox

Due to not using prefixes on Redox, yet, it must be added as an exception to Path::is_absolute.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/path.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstd/path.rs b/src/libstd/path.rs
index bf105a50d64..eb0a6cd74d7 100644
--- a/src/libstd/path.rs
+++ b/src/libstd/path.rs
@@ -1508,7 +1508,8 @@ impl Path {
     #[stable(feature = "rust1", since = "1.0.0")]
     #[allow(deprecated)]
     pub fn is_absolute(&self) -> bool {
-        self.has_root() && (cfg!(unix) || self.prefix().is_some())
+        // FIXME: Remove target_os = "redox" and allow Redox prefixes
+        self.has_root() && (cfg!(unix) || cfg!(target_os = "redox") || self.prefix().is_some())
     }
 
     /// A path is *relative* if it is not absolute.