1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

realpath, relpath: fix on stable and beta (whoops)

This commit is contained in:
Alex Lyon 2018-01-17 15:35:42 -08:00
parent e9f32fe170
commit 91b7ae44d6
2 changed files with 2 additions and 2 deletions

View file

@ -77,7 +77,7 @@ fn resolve_path(path: &str, strip: bool, zero: bool, quiet: bool) -> bool {
let mut links_left = 256;
for part in abs.components() {
result.push(&part);
result.push(part.as_os_str());
loop {
if links_left == 0 {
if !quiet { show_error!("Too many symbolic links: {}", path) };

View file

@ -75,7 +75,7 @@ pub fn uumain(args: Vec<String>) -> i32 {
let mut result = PathBuf::new();
absfrom.components().skip(suffix_pos).map(|_| result.push("..")).last();
absto.components().skip(suffix_pos).map(|x| result.push(&x)).last();
absto.components().skip(suffix_pos).map(|x| result.push(x.as_os_str())).last();
println!("{}", result.display());
0