Skip to content

Commit

Permalink
Rollup merge of #134252 - hermit-os:hermit-is_absolute, r=tgross35
Browse files Browse the repository at this point in the history
Fix `Path::is_absolute` on Hermit

Paths on Hermit work like paths on Unix.

Closes #132141.
  • Loading branch information
matthiaskrgr authored Dec 14, 2024
2 parents 4a204be + 907846e commit c58b8bc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion library/std/src/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
}

Expand Down

0 comments on commit c58b8bc

Please sign in to comment.