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.
This commit is contained in:
bors 2017-01-14 11:03:25 +00:00
commit b4c0207148

View File

@ -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.