mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-05 15:37:47 +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() {
|
for comp in path.components() {
|
||||||
match comp {
|
match comp {
|
||||||
Component::ParentDir => {
|
Component::ParentDir => {
|
||||||
|
if let Ok(p) = result.read_link() {
|
||||||
|
result = p;
|
||||||
|
}
|
||||||
result.pop();
|
result.pop();
|
||||||
}
|
}
|
||||||
Component::CurDir => (),
|
Component::CurDir => (),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue