mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-04 23:17:46 +00:00
uucore: read symlinked directories correctly in resolve_relative_path()
This commit is contained in:
parent
f3639b9453
commit
f61f30f52b
1 changed files with 3 additions and 0 deletions
|
@ -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 => (),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue