Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Ifos.path.realpath() encounters a symlink loop on posix, it prematurely stops querying paths and resolving symlink targets. This differs from coreutilsrealpath:
$cd /tmp$ ln -s loop loop$ ln -s target link$ realpath -m loop/../link/tmp/target$ python -c'import os.path; print(os.path.realpath("loop/../link"))'/tmp/link
It also differs from howlstat() errors are handled:
$ realpath -m missing/../link/tmp/target$ python -c'import os.path; print(os.path.realpath("missing/../link"))'/tmp/target