mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 06:30:08 +02:00
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:
@ -1,7 +1,7 @@
|
||||
#![no_main]
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
use nu_path::{expand_path_with, expand_tilde, expand_to_real_path, trim_trailing_slash};
|
||||
use nu_path::{expand_path_with, expand_tilde, expand_to_real_path};
|
||||
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
if let Ok(s) = std::str::from_utf8(data) {
|
||||
@ -10,9 +10,6 @@ fuzz_target!(|data: &[u8]| {
|
||||
// Fuzzing expand_to_real_path function
|
||||
let _ = expand_to_real_path(path);
|
||||
|
||||
// Fuzzing trim_trailing_slash function
|
||||
let _ = trim_trailing_slash(s);
|
||||
|
||||
// Fuzzing expand_tilde function
|
||||
let _ = expand_tilde(path);
|
||||
|
||||
|
Reference in New Issue
Block a user