Skip to content

Commit b4c0207

Browse files
committed
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.
2 parents 7d82d95 + ca2ade1 commit b4c0207

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/libstd/path.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1508,7 +1508,8 @@ impl Path {
15081508
#[stable(feature = "rust1", since = "1.0.0")]
15091509
#[allow(deprecated)]
15101510
pub fn is_absolute(&self) -> bool {
1511-
self.has_root() && (cfg!(unix) || self.prefix().is_some())
1511+
// FIXME: Remove target_os = "redox" and allow Redox prefixes
1512+
self.has_root() && (cfg!(unix) || cfg!(target_os = "redox") || self.prefix().is_some())
15121513
}
15131514

15141515
/// A path is *relative* if it is not absolute.

0 commit comments

Comments
 (0)