Files
Chris Denton de676be901 Introduce nupath::absolute_with and use it in glob (#17312)
This PR introduces `absolute_with` as a possible alternative to
`canonicalize_with`. This is exactly the same as `canonicalize_with`
except that it uses `std::path::absolute` instead of
`std::fs::canonicalize`. Using `absolute` doesn't require accessing the
filesystem and doesn't resolve symlinks so it won't fail in cases where
`canonicalize` would. It does however have platform specific differences
because `..` are links on Unix but they're not on Windows.

Fixes the `glob` issue mentioned in #17297. While I think this could be
used in more, some care would need to be taken to make sure we're not
changing semantics or if we are then we're doing so intentionally. E.g.
in this case `canonicalize_with` was used to both canonicalize the path
and test for its existence. So I at least would like to see what
nushell's CI makes of this (as well as reviewers, of course) before
going any further.

## Release notes summary - What our users need to know

`glob` no longer canoncailizes paths internally

## Tasks after submitting
<!-- Remove any tasks which aren't relevant for your PR, or add your own
- [ ] Update the
[documentation](https://github.com/nushell/nushell.github.io)
-->
2026-01-07 13:28:23 -06:00

4 lines
49 B
Rust

mod absolute;
mod canonicalize;
mod expand_path;