Fix is_absolute on Redox
This commit is contained in:
parent
8780962828
commit
ca2ade1d36
1 changed files with 2 additions and 1 deletions
|
@ -1495,7 +1495,8 @@ impl Path {
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[allow(deprecated)]
|
#[allow(deprecated)]
|
||||||
pub fn is_absolute(&self) -> bool {
|
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.
|
/// A path is *relative* if it is not absolute.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue