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:
parent
c403270ac3
commit
3ab82f9a66
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