Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pathdev() handling of symlinks #511

Closed
wants to merge 1 commit into from
Closed

Fix pathdev() handling of symlinks #511

wants to merge 1 commit into from

Conversation

krader1961
Copy link
Contributor

This fixes the io.sh unit test on any platform which has two consecutive
symlinks in the temp directory pathname that points to a path longer than
the symlink. It also introduces a regression test which fails on Linux
(where /tmp isn't normally a symlink) without this change.

Note that I do not claim this change is 100% correct. The original code
is borderline impossible to understand. But this does fix the problem
and doesn't introduce any new unit test failures.

Partial fix for #483
Resolves #492

This fixes the io.sh unit test on any platform which has two consecutive
symlinks in the temp directory pathname that points to a path longer than
the symlink. It also introduces a regression test which fails on Linux
(where /tmp isn't normally a symlink) without this change.

Note that I do not claim this change is 100% correct. The original code
is borderline impossible to understand. But this does fix the problem
and doesn't introduce any new unit test failures.

Partial fix for #483
Resolves #492
@siteshwar
Copy link
Contributor

@krader1961 Thanks for taking time to fix this. But I think it would be better to remove pathdev() code.

@krader1961
Copy link
Contributor Author

I think it would be better to remove pathdev() code.

I agree. I'm going to merge this anyway since we need to allow at least a couple of weeks to discuss that proposal. In the meantime this reduces test failures on macOS from 11 to 9 and fixes a bug that is visible on every OS.

@krader1961 krader1961 closed this May 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Something is wrong with pathdev and thus pathcanon()
2 participants