Path expansion no longer removes trailing slashes (#12662)

This PR changes `nu_path::expand_path_with()` to no longer remove
trailing slashes. It also fixes bugs in the current implementation due
to ineffective tests (Fixes #12602).
This commit is contained in:
YizhePKU
2024-05-02 06:28:54 +08:00
committed by GitHub
parent b22d131279
commit f184a77fe1
9 changed files with 476 additions and 355 deletions

View File

@ -1,10 +1,11 @@
mod assert_path_eq;
mod components;
pub mod dots;
pub mod expansions;
mod helpers;
mod tilde;
mod util;
pub use components::components;
pub use expansions::{canonicalize_with, expand_path_with, expand_to_real_path, locate_in_dirs};
pub use helpers::{config_dir, config_dir_old, home_dir};
pub use tilde::expand_tilde;
pub use util::trim_trailing_slash;