diff --git a/library/std/src/path.rs b/library/std/src/path.rs index b83c1e9628d..6fa73042a30 100644 --- a/library/std/src/path.rs +++ b/library/std/src/path.rs @@ -1838,7 +1838,7 @@ impl Path { // FIXME: Allow Redox prefixes self.has_root() || has_redox_scheme(self.as_u8_slice()) } else { - self.has_root() && (cfg!(unix) || self.prefix().is_some()) + self.has_root() && (cfg!(any(unix, target_os = "wasi")) || self.prefix().is_some()) } }