Web lists-archives.com

Issue with resolving symlinks (realpath, readlink, etc)


Programs and functions that rely in realpath() are broken.

$ cd
$ ln -s /var symlink
$ cd symlink
$ readlink -m .
$ mkdir subfolder
$ cd subfolder
$ readlink -m .
# should be /var/subfolder

This is the block I think is causing problems, as it breaks the loop
as soon as a real file is found, instead of iterating further upwards
resolving ancestors.

There also a comment at line 736 that says:
"Scan path_copy from right to left looking either for a symlink or an
actual existing file. If an existing file is found, just return. If a
symlink is found, exit the for loop."

Thank you.

Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple