1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-08-01 05:27:45 +00:00

uucore: read symlinked directories correctly in resolve_relative_path()

This commit is contained in:
Arcterus 2016-11-26 17:16:11 -08:00
parent c403270ac3
commit 3ab82f9a66

View file

@ -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 => (),