Skip to content

Commit c58b8bc

Browse files
authored
Rollup merge of #134252 - hermit-os:hermit-is_absolute, r=tgross35
Fix `Path::is_absolute` on Hermit Paths on Hermit work like paths on Unix. Closes #132141.
2 parents 4a204be + 907846e commit c58b8bc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

library/std/src/path.rs

+3-1
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)