From 3ab82f9a665918d237310b3fa9d48da5f5b46e58 Mon Sep 17 00:00:00 2001 From: Arcterus Date: Sat, 26 Nov 2016 17:16:11 -0800 Subject: [PATCH] uucore: read symlinked directories correctly in resolve_relative_path() --- src/uucore/fs.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/uucore/fs.rs b/src/uucore/fs.rs index 6f6ff3e2b..6c16c7177 100644 --- a/src/uucore/fs.rs +++ b/src/uucore/fs.rs @@ -26,6 +26,9 @@ pub fn resolve_relative_path<'a>(path: &'a Path) -> Cow<'a, Path> { for comp in path.components() { match comp { Component::ParentDir => { + if let Ok(p) = result.read_link() { + result = p; + } result.pop(); } Component::CurDir => (),