Skip to content

Commit 1dd52c9

Browse files
matthiaskrgrgitbot
authored and
gitbot
committed
Rollup merge of rust-lang#134252 - hermit-os:hermit-is_absolute, r=tgross35
Fix `Path::is_absolute` on Hermit Paths on Hermit work like paths on Unix. Closes rust-lang#132141.
2 parents 2aec00b + 0632f32 commit 1dd52c9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

std/src/path.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2327,7 +2327,9 @@ impl Path {
23272327
// FIXME: Allow Redox prefixes
23282328
self.has_root() || has_redox_scheme(self.as_u8_slice())
23292329
} else {
2330-
self.has_root() && (cfg!(any(unix, target_os = "wasi")) || self.prefix().is_some())
2330+
self.has_root()
2331+
&& (cfg!(any(unix, target_os = "hermit", target_os = "wasi"))
2332+
|| self.prefix().is_some())
23312333
}
23322334
}
23332335

0 commit comments

Comments
 (0)