From 907846e01b759cda8da7f3ac369b657e29bdff54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Fri, 13 Dec 2024 11:50:40 +0100 Subject: [PATCH] Fix `Path::is_absolute` on Hermit --- library/std/src/path.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/std/src/path.rs b/library/std/src/path.rs index 5b277a982eeb8..35e920ab34476 100644 --- a/library/std/src/path.rs +++ b/library/std/src/path.rs @@ -2327,7 +2327,9 @@ impl Path { // FIXME: Allow Redox prefixes self.has_root() || has_redox_scheme(self.as_u8_slice()) } else { - self.has_root() && (cfg!(any(unix, target_os = "wasi")) || self.prefix().is_some()) + self.has_root() + && (cfg!(any(unix, target_os = "hermit", target_os = "wasi")) + || self.prefix().is_some()) } }